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

507 active golfers, 1668 entries

Leaderboard (lowest score wins):
12
#151 - no name / @vimgol

01/30/2015 at 03:54PM

12
#152 - Eduardo / @earada

02/15/2015 at 04:40PM

12
#153 - xieyh11 / @xieyh11

02/16/2015 at 03:35AM

12
#154 - pftb12345 / @pftb12345

03/31/2015 at 01:49PM

12
#155 - Charles Joachim / @cacplate

04/21/2015 at 02:19AM

12
#156 - Antony Scriven / @antonyscriven

05/05/2015 at 04:43PM

12
#157 - Slurpie Chapdash / @SlurpieChapdash

05/11/2015 at 02:45PM

12
#158 - Personal Life Trackr / @PersLifeTrackr

05/27/2015 at 10:36PM

12
#159 - Lifepillar / @lifepillar

07/23/2015 at 09:47PM

12
#160 - Kirill Cherkashin / @kirjs

09/19/2015 at 10:15PM

12
#161 - Mikael Saltzman / @MikaelSaltzman

09/26/2015 at 04:49PM

12
#162 - DespicableJerk / @JerkDespicable

10/22/2015 at 03:30PM

12
#163 - retro / @tryphopp

01/20/2016 at 08:27AM

12
#164 - Janine Cheng / @janineist

02/14/2016 at 06:40AM

12
#165 - ben kavanagh / @bkava

02/23/2016 at 03:39AM

12
#166 - Dimitar Dimitrov / @kurkale6ka

03/11/2016 at 04:42PM

12
#167 - Saki Gw / @Sakigw

04/03/2016 at 06:59PM

12
#168 - Robber Toe / @robbertoe

04/03/2016 at 09:28PM

12
#169 - Michal Sylwester / @msylw

05/27/2016 at 08:31AM

12
#170 - Ram Tamtam / @ramtamtamtam

06/23/2016 at 10:08AM

12
#171 - Fran├žois Marais / @maraisf

08/09/2016 at 06:02PM

12
#172 - Constantine / @ConstantineHatz

09/27/2016 at 08:21PM

12
#173 - Stanislav / @prstad

09/28/2016 at 09:09AM

12
#174 - Bill Ruddock / @biinari

10/31/2016 at 04:37AM

12
#175 - timerella® / @timerella

11/17/2016 at 10:43PM

12
#176 - YNWP / @ynw_P

12/07/2016 at 11:48AM

12
#177 - Marcin / @Marcin89439917

12/31/2016 at 01:02AM

12
#178 - Alex Linden / @alexwlinden1

04/19/2017 at 07:01PM

12
#179 - Brian Hall / @_bruab_

05/05/2017 at 01:01PM

12
#180 - Carl Egbert / @CarlOEgbert

06/11/2017 at 09:10PM