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 493 remaining solutions by signing in and submitting your own entry
#494 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__

494 active golfers, 2482 entries

Leaderboard (lowest score wins):
28
#361 - x03n046 / @x03n046

05/17/2022 at 01:43AM

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

06/12/2022 at 03:04PM

28
#363 - Brandon / @Brandon10678836

08/25/2022 at 11:30AM

28
#364 - Olivier Bégassat / @zk_evm

06/11/2023 at 07:52PM

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

08/03/2023 at 05:26PM

28
#366 - Pablo Acuna / @pacuna

08/28/2024 at 11:20PM

28
#367 - godjun123 / @godjun123

03/27/2025 at 07:45AM

29
#368 - Muhsin AbdulMohammed / @muhsin____

08/16/2020 at 06:34PM

29
#369 - Theo Sarrazin / @tshaero

08/17/2020 at 05:55PM

29
#370 - Paschalis Economou / @PaschalisEcono1

08/20/2020 at 05:48AM

29
#371 - noxxi / @noooxxi

08/20/2020 at 02:55PM

29
#372 - David / @imdavidhwang

09/04/2020 at 07:32PM

29
#373 - Sergey Yakovlev / @selfuryon

09/25/2020 at 10:59PM

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

01/20/2021 at 12:01PM

29
#375 - m397 / @m39752809546

05/31/2021 at 07:24PM

29
#376 - PINGU / @PINGU79544082

12/04/2021 at 01:54PM

29
#377 - Иван / @wansmer

04/20/2023 at 09:46PM

30
#378 - RaylanFox / @RaylanFox

09/30/2020 at 07:35PM

30
#379 - Demian Martinez / @demianuco

11/01/2020 at 11:29PM

30
#380 - Bharath / @Bharath15952517

12/12/2020 at 07:02PM

30
#381 - Linus Bergman / @LinusBergman8

05/16/2021 at 06:20AM

30
#382 - Ryan Murphy / @RyanMur03026891

05/24/2022 at 11:48PM

30
#383 - happyzerojun / @happyzerojun

04/10/2024 at 11:19AM

30
#384 - Raul / @Raul-H

05/10/2024 at 06:47PM

30
#385 - 애순이 / @bLa0ljvV6MF14iq

11/02/2025 at 08:26AM

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

09/05/2020 at 06:06PM

31
#387 - AAbraxas / @AAbraxas1

10/11/2020 at 07:02PM

31
#388 - deedeemeen / @deedeemeen

10/15/2020 at 06:54PM

31
#389 - Yondonjamts Ganzorig / @yondonjamts_g

11/14/2020 at 09:43PM

31
#390 - yxke / @_yxke

01/16/2021 at 01:08AM