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

202 active golfers, 496 entries

Leaderboard (lowest score wins):
34
#1 - Akira Matsuda / @a_matsuda

12/30/2010 at 05:16PM

34
#2 - derp derp / @derp__

01/02/2011 at 12:05AM

34
#3 - Ujjwol Lamichhane / @Ujjwol

01/06/2011 at 12:33PM

34
#4 - Balkoth / @_Balkoth_

01/08/2011 at 05:47PM

34
#5 - Tim Chase / @gumnos

01/13/2011 at 03:20AM

34
#6 - Wei Dai / @clvv42

01/13/2011 at 03:23AM

34
#7 - h_east (トロッコ6個) / @h_east

01/16/2011 at 07:24AM

34
#8 - Oleg Roshupkin / @jjjahson

01/21/2011 at 05:34AM

34
#9 - vg / @vimgolfer

02/26/2011 at 04:42PM

34
#10 - Justin Love / @wondible

06/13/2011 at 01:18PM

34
#11 - Hu Junfeng / @junfeng

07/17/2011 at 12:17PM

34
#12 - Andrey Ivanov / @Bytamine

08/11/2011 at 11:24AM

34
#13 - Federico Galassi / @federicogalassi

08/28/2011 at 01:46AM

34
#14 - p0ckets / @p0ckets

10/06/2011 at 11:42PM

34
#15 - You-Siang Lin / @yslinnctu

11/29/2011 at 03:25PM

34
#16 - Pei-Lun Lee / @ypcatw

01/14/2012 at 05:47AM

34
#17 - Zeh Rizzatti / @zehrizzatti

02/08/2012 at 05:19AM

34
#18 - Renat Aksitov / @Korvin79

02/09/2012 at 08:55AM

34
#19 - Nolen Royalty / @NolenRoyalty

04/21/2012 at 10:22PM

34
#20 - Rod Knowlton / @codelahoma

05/27/2012 at 03:51AM

34
#21 - Joe McCall / @joem86

07/02/2012 at 09:47PM

34
#22 - Kerson Hsiao / @KersonHsiao

07/12/2012 at 07:31AM

34
#23 - Conner McDaniel / @connermcd

09/19/2012 at 02:04AM

34
#24 - Urtica dioica / @udioica

12/13/2012 at 07:26AM

34
#25 - Hubba / @HubbaBubbaFett

12/16/2012 at 12:11PM

34
#26 - Trevor Powell / @DoomedBunnies

03/20/2013 at 05:24AM

34
#27 - Marco Hinz / @_mhinz_

05/22/2013 at 08:55AM

34
#28 - Petro Тrouq / @zulolosi

07/06/2013 at 01:42AM

34
#29 - Daniel Jonsson / @DanielJonss

01/21/2014 at 04:43PM

34
#30 - John Braxler / @braxler

05/06/2014 at 12:24PM