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

519 active golfers, 1730 entries

Leaderboard (lowest score wins):
14
#301 - M S / @b1790037

03/15/2016 at 08:24PM

14
#302 - Andrew C. / @isarl

03/16/2016 at 01:40PM

14
#303 - エクシル / @sicoh395

04/07/2016 at 02:27PM

14
#304 - Jake Griffin / @J4K0_G

04/22/2016 at 11:45PM

14
#305 - Ryan Dwyer / @ryan_dwyer

06/05/2016 at 10:07PM

14
#306 - jan sos / @jann6373

06/13/2016 at 03:24PM

14
#307 - Yudi Matsuzake / @yudimatsuzake

06/14/2016 at 02:01PM

14
#308 - Ryan van Rensburg / @rdvr001

07/21/2016 at 01:12PM

14
#309 - 王运 / @640138017

07/24/2016 at 02:08PM

14
#310 - Jeremiah Goyette / @JeremiahGoyette

08/01/2016 at 06:29AM

14
#311 - Quatrix / @Quatrix

08/10/2016 at 09:31PM

14
#312 - citaret / @citaret

08/28/2016 at 03:16AM

14
#313 - TweetDreams / @TweetMusicians

10/09/2016 at 07:02AM

14
#314 - John Barbero Unenge / @JBarberU

11/18/2016 at 01:43PM

14
#315 - BlackCap / @BlackCapCoder

11/30/2016 at 09:45AM

14
#316 - tPenguinLTG / @tpenguinltg

01/03/2017 at 01:00PM

14
#317 - Hans Yelek / @hans_yelek

01/12/2017 at 12:21AM

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

04/10/2017 at 02:04PM

14
#319 - Wang Wu / @rubepeg

05/12/2017 at 06:31AM

14
#320 - Daniel / @0x9ABC

08/18/2017 at 04:56PM

14
#321 - Kaydo Alders / @Yousousen

03/13/2018 at 05:31PM

14
#322 - Dylan Nelson / @dlnnlsn

06/08/2018 at 06:02AM

14
#323 - Mahesh Ramchandani / @m_sharp

08/21/2018 at 03:35AM

14
#324 - Luis Rodriguez / @luisthecoder

11/14/2018 at 11:51PM

14
#325 - etwyniel / @etwyniel

12/31/2018 at 05:59PM

14
#326 - tp971 / @tp971

01/30/2019 at 07:38PM

14
#327 - zenwalker / @zenwalker93

03/11/2019 at 05:31PM

15
#328 - Paul Kunysch / @kunysch

07/17/2014 at 06:31AM

15
#329 - MonkeyBrains ISP / @monkeybrainsnet

07/26/2014 at 07:39AM

15
#330 - Dan Oneata / @DanOneata

07/26/2014 at 09:19PM