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

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

229 active golfers, 579 entries

Solutions by @poeminlash:
34
#41 - Qing Liu / @poeminlash

07/20/2022 at 05:29AM

35
#>61 - Qing Liu / @poeminlash

07/20/2022 at 05:27AM

36
#>67 - Qing Liu / @poeminlash

07/20/2022 at 05:26AM

37
#>71 - Qing Liu / @poeminlash

07/20/2022 at 05:25AM

38
#>74 - Qing Liu / @poeminlash

07/20/2022 at 05:15AM

38
#>74 - Qing Liu / @poeminlash

07/20/2022 at 05:21AM

42
#>115 - Qing Liu / @poeminlash

07/20/2022 at 05:09AM

43
#>126 - Qing Liu / @poeminlash

07/20/2022 at 05:11AM

44
#>132 - Qing Liu / @poeminlash

07/20/2022 at 05:13AM

47
#>159 - Qing Liu / @poeminlash

07/20/2022 at 05:07AM