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):
28
#331 - Jonathan / @jonathannerat

07/17/2020 at 01:56PM

28
#332 - Иван Сайкин / @saikin_89

07/19/2020 at 10:52AM

28
#333 - Emil Vatai / @vatai

07/19/2020 at 03:19PM

28
#334 - Hristo Mitev / @harasioto_minto

07/24/2020 at 09:28AM

28
#335 - drGsus / @drGsus

07/24/2020 at 04:43PM

28
#336 - Juan Manuel Fresia / @fresiajm

07/27/2020 at 03:05AM

28
#337 - Jason Zhang / @jiamingz721

07/28/2020 at 05:39PM

28
#338 - Martin Bielik / @mabielik

08/06/2020 at 08:18PM

28
#339 - Alexander L. / @Lexol4s

08/11/2020 at 05:44PM

28
#340 - serici / @serici

08/20/2020 at 10:54AM

28
#341 - marco / @helmetk

08/27/2020 at 10:35AM

28
#342 - Muffin / @Muffin91707986

09/03/2020 at 09:26PM

28
#343 - Marc Päpper / @mpaepper

10/10/2020 at 11:55AM

28
#344 - Jakub Wagner / @Jakub1019

10/22/2020 at 05:36PM

28
#345 - Filipe 💙 / @ABarroso

10/24/2020 at 05:24PM

28
#346 - Rafal C. / @RafalC37709324

11/13/2020 at 09:10PM

28
#347 - Fabrice BONNET / @FabriceBONNET6

04/29/2021 at 03:51PM

28
#348 - Tuure / @tuure_p

05/19/2021 at 09:52PM

28
#349 - Marcus / @marcusostling94

06/11/2021 at 09:39AM

28
#350 - Quentin Leroy / @qnleroy

08/22/2021 at 04:59PM

28
#351 - Clint Caudle / @ClintCaudle

08/30/2021 at 03:30AM

28
#352 - duyker / @duyker

12/24/2021 at 04:57AM

28
#353 - rappenstein2 / @rappenstein2

01/12/2022 at 11:12AM

28
#354 - x03n046 / @x03n046

05/17/2022 at 01:43AM

28
#355 - math is what I hate / @mpnmbn

06/12/2022 at 03:04PM

28
#356 - Brandon / @Brandon10678836

08/25/2022 at 11:30AM

28
#357 - Olivier Bégassat / @zk_evm

06/11/2023 at 07:52PM

28
#358 - مرجان / @IEnfantTerribIe

08/03/2023 at 05:26PM

28
#359 - Pablo Acuna / @pacuna

08/28/2024 at 11:20PM

28
#360 - godjun123 / @godjun123

03/27/2025 at 07:45AM