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

495 active golfers, 2485 entries

Leaderboard (lowest score wins):
38
#451 - HenryArms / @henryarms

03/31/2026 at 06:31PM

39
#452 - binayak tiwari / @bintiw

08/03/2020 at 12:49AM

39
#453 - Christopher Oosthuizen / @ChristopherOos8

11/04/2020 at 03:03PM

39
#454 - guidoguidoguido / @un_nome_stupido

04/28/2021 at 11:15AM

40
#455 - Kenny Nguyen / @KennyNg72375669

08/05/2020 at 08:43AM

40
#456 - Bro / @SpeorgNot

08/21/2020 at 03:34PM

40
#457 - Markus Muschol / @MarkusMuschol

07/13/2021 at 12:46PM

41
#458 - Josivan Joestar πŸ‡ΊπŸ‡³πŸŒŽπŸš€ / @MedeirosJosivan

07/21/2020 at 05:32PM

41
#459 - Just Alerik / @Just_Alerik

09/18/2020 at 03:25AM

41
#460 - Bobik / @Bobik90703384

10/14/2021 at 05:47PM

41
#461 - kimbadaa / @kimbadaa

04/02/2025 at 01:08PM

41
#462 - HYoMo-nim / @HYoMo-nim

04/02/2025 at 01:09PM

42
#463 - brianhotopp / @brianhotopp

07/20/2020 at 11:36PM

42
#464 - Kaustubh Murumkar / @k_austub_h

09/21/2020 at 02:23PM

42
#465 - kontonavn / @kontonavn2

01/16/2021 at 11:17PM

42
#466 - ζ’… / @umetosawara

04/17/2022 at 08:28AM

42
#467 - εžζ‰ΏεΎ· / @bianchengde1

06/16/2022 at 03:26PM

42
#468 - ishj00 / @ishj00

04/01/2025 at 01:56PM

42
#469 - 였λ₯˜ / @olyu249581

11/02/2025 at 01:56AM

43
#470 - Kevin Linnane / @linnanekevin07

12/30/2020 at 11:09PM

44
#471 - Graic / @Griac628

07/24/2020 at 06:41AM

44
#472 - Ben Wainwright / @benwainwrightuk

09/26/2020 at 01:55PM

44
#473 - Leo sunil / @tomyail

12/07/2020 at 06:07AM

45
#474 - Dane / @studdugie

07/27/2020 at 06:32PM

45
#475 - ZackBurtAWS / @ZackBurtSDE

09/22/2020 at 03:13PM

45
#476 - LJ / @LiterallyJohnny

12/12/2020 at 06:49PM

45
#477 - boom / @boom40668011

12/22/2021 at 08:24PM

45
#478 - sequel / @sequel25

01/19/2022 at 07:01PM

45
#479 - rlatmdgk1203 / @rlatmdgk1203

03/27/2025 at 01:22AM

46
#480 - 伟ε“₯ / @w15659018558

09/15/2020 at 08:22AM