Real Vim ninjas count every keystroke - do you?

Pick a challenge, fire up Vim, and show us what you got.

Changelog, Rules & FAQ, updates: @vimgolf, RSS.

Your VimGolf key: please sign in

$ gem install vimgolf
$ vimgolf setup
$ vimgolf put 4d1ace6c142cca7133000033

Reformat some Python

Fix some very bizarrely laid-out code.

Start file
def fed(j):
    n = sum([1000000000,
              200000000,
               30000000,
                4000000,
                 500000,
                  60000,
                   7000,
                    800,
                     90,
                     j])
    print('abc'+str(n)+'def')
End file
def fed(j):
    n = 1234567890 + j
    print('abc%ddef' % n)

View Diff

2,12c2,3
<     n = sum([1000000000,
<               200000000,
<                30000000,
<                 4000000,
<                  500000,
<                   60000,
<                    7000,
<                     800,
<                      90,
<                      j])
<     print('abc'+str(n)+'def')
---
>     n = 1234567890 + j
>     print('abc%ddef' % n)

Solutions by @mcguire:

Unlock 8 remaining solutions by signing in and submitting your own entry
Created by: @holizz

236 active golfers, 609 entries

Solutions by @mcguire:
40
#94 - TimMcGuire / @mcguire

09/01/2020 at 04:43PM

41
#>110 - TimMcGuire / @mcguire

09/01/2020 at 04:17PM

43
#>132 - TimMcGuire / @mcguire

09/01/2020 at 04:01PM

48
#>172 - TimMcGuire / @mcguire

09/01/2020 at 03:57PM

48
#>172 - TimMcGuire / @mcguire

09/01/2020 at 03:59PM

49
#>173 - TimMcGuire / @mcguire

09/01/2020 at 12:00AM

57
#>200 - TimMcGuire / @mcguire

08/31/2020 at 11:58PM

62
#>208 - TimMcGuire / @mcguire

08/31/2020 at 11:56PM