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

482 active golfers, 1565 entries

Leaderboard (lowest score wins):
12
#151 - Personal Life Trackr / @PersLifeTrackr

05/27/2015 at 10:36PM

12
#152 - Lifepillar / @lifepillar

07/23/2015 at 09:47PM

12
#153 - Kirill Cherkashin / @kirjs

09/19/2015 at 10:15PM

12
#154 - Mikael Saltzman / @MikaelSaltzman

09/26/2015 at 04:49PM

12
#155 - DespicableJerk / @JerkDespicable

10/22/2015 at 03:30PM

12
#156 - retro / @tryphopp

01/20/2016 at 08:27AM

12
#157 - Janine Cheng / @janineist

02/14/2016 at 06:40AM

12
#158 - ben kavanagh / @bkava

02/23/2016 at 03:39AM

12
#159 - Dimitar Dimitrov / @kurkale6ka

03/11/2016 at 04:42PM

12
#160 - Saki Gw / @Sakigw

04/03/2016 at 06:59PM

12
#161 - Robber Toe / @robbertoe

04/03/2016 at 09:28PM

12
#162 - Michal Sylwester / @msylw

05/27/2016 at 08:31AM

12
#163 - Ram Tamtam / @ramtamtamtam

06/23/2016 at 10:08AM

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

08/09/2016 at 06:02PM

12
#165 - Constantine / @ConstantineHatz

09/27/2016 at 08:21PM

12
#166 - Stanislav / @prstad

09/28/2016 at 09:09AM

12
#167 - Bill Ruddock / @biinari

10/31/2016 at 04:37AM

12
#168 - timerella® / @timerella

11/17/2016 at 10:43PM

12
#169 - YNWP / @ynw_P

12/07/2016 at 11:48AM

12
#170 - Marcin / @Marcin89439917

12/31/2016 at 01:02AM

12
#171 - Alex Linden / @alexwlinden1

04/19/2017 at 07:01PM

12
#172 - Brian Hall / @_bruab_

05/05/2017 at 01:01PM

12
#173 - Carl Egbert / @CarlOEgbert

06/11/2017 at 09:10PM

12
#174 - David Gustavsson / @mrGustaphe

06/15/2017 at 08:56AM

12
#175 - moritz / @moritz45081535

06/18/2017 at 04:16PM

12
#176 - Christian Stammen / @c0smiq

06/30/2017 at 08:38AM

12
#177 - Ben Hill / @KaizenSoze70

10/12/2017 at 06:32PM

12
#178 - Turkey Man / @lvturkeyman

11/10/2017 at 01:21AM

12
#179 - John C Shea / @MHSSachems

02/04/2018 at 11:29AM

12
#180 - Arijus / @argshook

02/09/2018 at 09:58AM