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 5f1063aa8361810006e73210

Satisfy the go linter

You just came up with this briliant go vars package. But dang, you forgot to add comments to the exported variables. Can you add a comment over each variable with a TODO-placeholder?

Start file
package vars

var (
       
Version string
       
Debug bool
)
End file
package vars

var (
       
// Version TODO
       
Version string
       
// Debug TODO
       
Debug bool
)

View Diff

3a4
>       // Version TODO
4a6
>       // Debug TODO

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 480 remaining solutions by signing in and submitting your own entry
#481 Eric Wennerberg / @ericwenn - Score: 145 - 03/20/22 @ 16:40
:%s\(\s)<Left>\<Right>\(\S*)\S*/<Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right><Right><Right><Right><Right><Right><Right><Right>\<Right><Right><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>*<Right><Right><Right><Right><Right><Right><Right><Left><Left><Right><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left>/<Right><Right><Right><Right><Right><BS><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right><Right>$<Left><Left><Left><Left><Left><Left><Left><Right><Right><Right> <Right><Right><Right><Right><Right>\1\/\/ TOD<BS><BS><BS>\2 TODO\r$<BS>\0<CR><Esc>:wq<CR>

0 comments


Created by: @__dadav__

481 active golfers, 2437 entries

Leaderboard (lowest score wins):
29
#361 - Muhsin AbdulMohammed / @muhsin____

08/16/2020 at 06:34PM

29
#362 - Theo Sarrazin / @tshaero

08/17/2020 at 05:55PM

29
#363 - Paschalis Economou / @PaschalisEcono1

08/20/2020 at 05:48AM

29
#364 - noxxi / @noooxxi

08/20/2020 at 02:55PM

29
#365 - David / @imdavidhwang

09/04/2020 at 07:32PM

29
#366 - Sergey Yakovlev / @selfuryon

09/25/2020 at 10:59PM

29
#367 - 蔡徐坤真是爱吃屎 / @Hashub7

01/20/2021 at 12:01PM

29
#368 - m397 / @m39752809546

05/31/2021 at 07:24PM

29
#369 - PINGU / @PINGU79544082

12/04/2021 at 01:54PM

29
#370 - Иван / @wansmer

04/20/2023 at 09:46PM

30
#371 - RaylanFox / @RaylanFox

09/30/2020 at 07:35PM

30
#372 - Demian Martinez / @demianuco

11/01/2020 at 11:29PM

30
#373 - Bharath / @Bharath15952517

12/12/2020 at 07:02PM

30
#374 - Linus Bergman / @LinusBergman8

05/16/2021 at 06:20AM

30
#375 - Ryan Murphy / @RyanMur03026891

05/24/2022 at 11:48PM

30
#376 - happyzerojun / @happyzerojun

04/10/2024 at 11:19AM

30
#377 - Raul / @Raul-H

05/10/2024 at 06:47PM

31
#378 - Václav Pernička / @VaclavPernicka

09/05/2020 at 06:06PM

31
#379 - AAbraxas / @AAbraxas1

10/11/2020 at 07:02PM

31
#380 - deedeemeen / @deedeemeen

10/15/2020 at 06:54PM

31
#381 - Yondonjamts Ganzorig / @yondonjamts_g

11/14/2020 at 09:43PM

31
#382 - yxke / @_yxke

01/16/2021 at 01:08AM

31
#383 - Faizan Ansari / @faizan_157

01/31/2021 at 01:53PM

31
#384 - Yttriferous / @YttriferousDev

05/25/2021 at 09:13AM

32
#385 - VQvMoKsy / @QvKsy

07/28/2020 at 04:50PM

32
#386 - fff / @fff51460170

01/13/2021 at 02:47AM

33
#387 - dotvimrc / @dotvimrc1

07/17/2020 at 06:45AM

33
#388 - Rustem B. / @_rustemb

07/31/2020 at 05:04PM

33
#389 - alrito / @alrito6

09/03/2020 at 06:11AM

33
#390 - versa / @versa51547979

10/16/2020 at 08:34PM