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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 215 remaining solutions by signing in and submitting your own entry
#216 Irfan Ahmad / @erfaan - Score: 299 - 12/29/10 @ 14:10
<Down><Down>dddddddddddddddd<Right>i<Del><Del><Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><BS><BS><BS><BS><BS><Right><Del>234567890<Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del> <kPlus><Del><Right><Right><Down><Home><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Left><Del><Del><Del><Del><Del><Del><Del><Del><Del><Del>%d<Right><Right><Right><Right> % n<Esc>:wq<CR>

0 comments


Created by: @holizz

216 active golfers, 545 entries

Leaderboard (lowest score wins):
56
#181 - manlon / @manlon

12/29/2010 at 06:12PM

57
#182 - Esteban Ordano / @eordano

04/07/2011 at 04:02AM

58
#183 - 김도현 / @ggobp

06/06/2019 at 10:32AM

59
#184 - Abhishek Mukherjee / @abhishekmukherg

12/29/2010 at 04:32PM

59
#185 - Bjørn Einar Bjartnes / @bjartnes

01/27/2012 at 12:35PM

60
#186 - lionel young / @lionelyoung

12/29/2010 at 07:05AM

60
#187 - Andrey A. Ugolnik / @andreyugolnik

01/19/2011 at 06:51PM

60
#188 - Jurica / @Jurica34581259

12/13/2018 at 04:42PM

61
#189 - Charlene Tshos / @charlymul

06/17/2013 at 08:08AM

62
#190 - Sid Kasivajhula / @CountVajhula

12/29/2010 at 07:39AM

63
#191 - Michael Lustfield / @Profarius

12/29/2010 at 06:25AM

63
#192 - Paul Tarjan / @ptarjan

12/29/2010 at 11:48AM

64
#193 - Jan B. / @bracki

12/29/2010 at 09:13AM

65
#194 - Geoffrey Bachelet / @ubermuda

12/29/2010 at 08:57AM

65
#195 - Arania Jain / @AraniaJain

12/29/2010 at 09:30AM

65
#196 - Alexey Komissarouk / @alexeymk

12/29/2010 at 01:26PM

65
#197 - smokey42 / @smokey42

12/29/2010 at 02:41PM

68
#198 - Solomon White / @rubysolo

12/29/2010 at 05:39PM

69
#199 - Thanassis Tsiodras / @ttsiodras

01/03/2011 at 06:20PM

72
#200 - Rob Howard / @damncabbage

12/29/2010 at 11:11AM

73
#201 - Fraxtil / @Fraxtil

12/29/2010 at 07:30AM

73
#202 - Dhruva Sagar / @dhruvasagar

12/29/2010 at 08:30AM

74
#203 - Jonathan Pui / @jpui

12/29/2010 at 08:11AM

74
#204 - Chris Flynn / @flynnguy

12/29/2010 at 03:55PM

75
#205 - Sushant / @sushftw

12/29/2010 at 12:51PM

83
#206 - Ben Dowling / @coderholic

12/31/2010 at 05:13PM

85
#207 - Gordy F / @gordyf

12/29/2010 at 06:48AM

90
#208 - Guillaume Bonnoron / @gbonnoron

12/31/2010 at 11:42AM

98
#209 - Mohammad Mithani / @mtmithani

12/23/2013 at 03:07AM

104
#210 - Charles Maresh / @CMaresh

12/29/2010 at 02:58PM