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 53c66c482b4166000226bbee

Don't know what this is

Replace contents of brackets with matching number of spaces. Don't ask what the format's supposed to be.

Start file
[1:0]
[0:1]
[1:100]
[0:100]
End file
[   ]
[   ]
[     ]
[     ]

View Diff

1,4c1,4
< [1:0]
< [0:1]
< [1:100]
< [0:100]
---
> [   ]
> [   ]
> [     ]
> [     ]

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 508 remaining solutions by signing in and submitting your own entry
#509 luffy / @raxcoi - Score: 75 - 08/01/14 @ 13:29
:<Up><Up><Up>%s/[^\[\]]*/\=repeat()/g<Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Left>' ', strlen()<Left>submatch(0)<CR>:wq<CR>

0 comments


Created by: @udioica

509 active golfers, 1678 entries

Leaderboard (lowest score wins):
14
#301 - Ryan van Rensburg / @rdvr001

07/21/2016 at 01:12PM

14
#302 - 王运 / @640138017

07/24/2016 at 02:08PM

14
#303 - Jeremiah Goyette / @JeremiahGoyette

08/01/2016 at 06:29AM

14
#304 - Quatrix / @Quatrix

08/10/2016 at 09:31PM

14
#305 - citaret / @citaret

08/28/2016 at 03:16AM

14
#306 - TweetDreams / @TweetMusicians

10/09/2016 at 07:02AM

14
#307 - John Barbero Unenge / @JBarberU

11/18/2016 at 01:43PM

14
#308 - BlackCap / @BlackCapCoder

11/30/2016 at 09:45AM

14
#309 - tPenguinLTG / @tpenguinltg

01/03/2017 at 01:00PM

14
#310 - Hans Yelek / @hans_yelek

01/12/2017 at 12:21AM

14
#311 - Миша Сорокин / @rafmikovi4

04/10/2017 at 02:04PM

14
#312 - Wang Wu / @rubepeg

05/12/2017 at 06:31AM

14
#313 - Daniel / @0x9ABC

08/18/2017 at 04:56PM

14
#314 - Kaydo Alders / @Yousousen

03/13/2018 at 05:31PM

14
#315 - Dylan Nelson / @dlnnlsn

06/08/2018 at 06:02AM

14
#316 - Mahesh Ramchandani / @m_sharp

08/21/2018 at 03:35AM

14
#317 - Luis Rodriguez / @luisthecoder

11/14/2018 at 11:51PM

14
#318 - etwyniel / @etwyniel

12/31/2018 at 05:59PM

14
#319 - tp971 / @tp971

01/30/2019 at 07:38PM

14
#320 - zenwalker / @zenwalker93

03/11/2019 at 05:31PM

15
#321 - Paul Kunysch / @kunysch

07/17/2014 at 06:31AM

15
#322 - MonkeyBrains ISP / @monkeybrainsnet

07/26/2014 at 07:39AM

15
#323 - Dan Oneata / @DanOneata

07/26/2014 at 09:19PM

15
#324 - marvlow / @marv_low

08/06/2014 at 07:39PM

15
#325 - Blake / @blkbsstt

08/08/2014 at 07:04AM

15
#326 - Rafee / @rafee_buet

08/11/2014 at 08:44AM

15
#327 - Edgar Gonzalez / @gonzedge

09/03/2014 at 06:53AM

15
#328 - James T. Huggett / @Jmeshka

09/03/2014 at 09:26AM

15
#329 - John Smith / @literacyisgood

09/05/2014 at 06:23AM

15
#330 - Nate Eagleson / @NateEag

10/01/2014 at 01:02AM