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

571 active golfers, 1948 entries

Leaderboard (lowest score wins):
11
#121 - Delon / @delonleonard

01/06/2020 at 11:13AM

11
#122 - Kevin Keefe / @KevinKeefe5

05/29/2020 at 05:35PM

11
#123 - Rustem B. / @_rustemb

07/31/2020 at 01:42PM

11
#124 - mindgitrwx / @mindgitrwx

08/17/2020 at 01:13AM

11
#125 - Jung Yeon Park / @park_jungy

01/11/2021 at 04:42PM

11
#126 - A A A / @37fatos

01/16/2021 at 08:24PM

11
#127 - m397 / @m39752809546

05/12/2021 at 04:23PM

11
#128 - Matrices Matlab #1 / @matrices_matlab

07/13/2021 at 07:18PM

11
#129 - Flimsy Giraffe / @flimsy_giraffe

11/30/2021 at 04:33AM

11
#130 - blabla zincou / @BZincou

04/25/2022 at 11:46PM

11
#131 - russellzhaomao / @russellzhaomao

05/26/2022 at 01:56AM

12
#132 - John Meisner / @jmeisned

07/16/2014 at 02:17PM

12
#133 - Anonymer Nasenbär / @g0rdin

07/16/2014 at 03:37PM

12
#134 - RiccardoSven Risuleo / @riccardosven

07/16/2014 at 08:34PM

12
#135 - Caek / @Caek_

07/16/2014 at 11:43PM

12
#136 - farseer / @FarseerSee2012

07/17/2014 at 01:48AM

12
#137 - Michi Loro / @michiloro

07/17/2014 at 09:15AM

12
#138 - Adit Cahya Ramadhan / @aditcr8

07/17/2014 at 10:10AM

12
#139 - Rawshark / @rawshark_alive

07/17/2014 at 12:30PM

12
#140 - buz / @buzbone

07/17/2014 at 12:52PM

12
#141 - João Carvalho / @joaoCarvas

07/17/2014 at 11:00PM

12
#142 - Eric Potter / @pottereric

07/18/2014 at 12:49PM

12
#143 - Grigoriy Alexeev / @GrigoriyAlexeev

07/18/2014 at 01:17PM

12
#144 - Amir Kremer / @AmirKremer

07/20/2014 at 11:31AM

12
#145 - Joey Twiddle / @joeytwiddle

07/20/2014 at 06:57PM

12
#146 - Pedro Santos / @pedrosans

07/21/2014 at 07:36PM

12
#147 - Milind Ganjoo / @mganjoo

07/24/2014 at 06:28AM

12
#148 - Kai Yuan / @kentyuan

07/25/2014 at 09:40AM

12
#149 - Joakim Hansen / @gnofs

07/29/2014 at 11:50PM

12
#150 - Guillaume Perrin / @Jojolejobar

08/02/2014 at 06:48PM