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 212 remaining solutions by signing in and submitting your own entry
#213 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

213 active golfers, 528 entries

Leaderboard (lowest score wins):
41
#91 - Wesley Wong / @wesleymwwong

01/30/2011 at 10:20AM

41
#92 - Ilya Strukov / @i1ey

05/02/2011 at 06:27AM

41
#93 - Øystein Walle / @oysteinwalle

07/07/2011 at 12:03AM

41
#94 - David / @dpa_92

08/02/2011 at 11:47AM

41
#95 - nicolas bo / @thevegeta

11/15/2011 at 04:35PM

41
#96 - Jyun-Fan Tsai / @fakecolor

02/17/2012 at 03:04PM

41
#97 - vansan / @VinceVansan

08/26/2012 at 06:37PM

41
#98 - cj / @cj01101

08/26/2013 at 09:51PM

42
#99 - Vitaly Kushner / @vkushner

12/29/2010 at 11:44PM

42
#100 - Behnam Esfahbod / @zwnj

12/30/2010 at 12:34PM

42
#101 - Joost / @vlabakje

02/11/2011 at 11:07PM

42
#102 - jasper110 / @jasper110

09/22/2011 at 09:52AM

42
#103 - Kubek2k / @kubek2k

02/12/2012 at 08:38PM

42
#104 - Benoit Thiell / @benoitthiell

07/19/2012 at 10:26PM

42
#105 - Arto Vuori / @dhpe

08/30/2012 at 09:26PM

42
#106 - Michael Comerford / @MComerford1

09/26/2014 at 01:19PM

42
#107 - glepha / @glepha_vim

03/31/2016 at 05:01AM

43
#108 - clint tseng / @cxlt

12/29/2010 at 06:21AM

43
#109 - Kenny Parnell / @kennyp

12/29/2010 at 07:52AM

43
#110 - John Lam / @john_lam

12/29/2010 at 09:18AM

43
#111 - pcapriotti / @pcapriotti

12/29/2010 at 11:23AM

43
#112 - Utkarsh Kukreti / @utkarshkukreti

12/29/2010 at 11:32AM

43
#113 - Addisu Taddese / @azeey

12/30/2010 at 07:04AM

43
#114 - Aviv Ben-Yosef / @avivby

12/30/2010 at 07:41AM

43
#115 - vTsoumenis / @kioopi

01/02/2011 at 04:54PM

43
#116 - Ashley Feniello / @AshleyFen

01/29/2012 at 05:58AM

43
#117 - Oliver Christ / @0liverChrist

10/05/2013 at 10:10PM

43
#118 - Walker Boh / @walker_boh

11/19/2015 at 08:29AM

44
#119 - Andrew Scala / @agscala

12/29/2010 at 06:13AM

44
#120 - Naveed Massjouni / @ironcamel

12/29/2010 at 06:40AM