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 @clvv42:

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

235 active golfers, 604 entries

Solutions by @clvv42:
34
#6 - Wei Dai / @clvv42

01/13/2011 at 03:23AM

36
#>67 - Wei Dai / @clvv42

01/13/2011 at 03:21AM

39
#>76 - Wei Dai / @clvv42

12/29/2010 at 10:21AM

41
#>97 - Wei Dai / @clvv42

12/29/2010 at 10:20AM

42
#>110 - Wei Dai / @clvv42

12/29/2010 at 10:16AM

44
#>134 - Wei Dai / @clvv42

12/29/2010 at 08:50AM

47
#>156 - Wei Dai / @clvv42

12/29/2010 at 08:15AM

48
#>164 - Wei Dai / @clvv42

12/29/2010 at 07:08AM

51
#>178 - Wei Dai / @clvv42

12/29/2010 at 06:59AM