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):
24
#241 - Leandro Lourenci / @lourenci

07/19/2020 at 11:48PM

24
#242 - Sergey Averkiev / @ExAnimoso

07/23/2020 at 02:03PM

24
#243 - Daniel Habib / @danielhvs

07/23/2020 at 10:24PM

24
#244 - Andy Yang / @yzwdroid

07/24/2020 at 03:45AM

24
#245 - 임덕윤 / @SnLHUF5ZYJXqI1m

07/26/2020 at 10:57AM

24
#246 - Nicolas Marier / @NicMarier

08/07/2020 at 12:01AM

24
#247 - santrupta mishra / @talkedgrain8

08/15/2020 at 03:03PM

24
#248 - Josh Kermond / @Kermond

08/21/2020 at 05:29AM

24
#249 - s3cy / @s3cyxx

08/23/2020 at 11:28AM

24
#250 - Marcio M Pereira / @iviarcio

08/23/2020 at 06:17PM

24
#251 - Anton Kriese / @AntonKriese

09/10/2020 at 07:18AM

24
#252 - Alex Watson / @AlexDewiWatson

12/01/2020 at 03:00PM

24
#253 - Thomas Lüdecke / @t0mM3k

01/21/2021 at 12:03PM

24
#254 - Ethan Rietz / @EthanRietz

06/28/2021 at 04:36PM

24
#255 - thari.eth / @thari_eth

11/14/2021 at 12:23PM

24
#256 - Marcel Funderák / @fundosh

03/12/2022 at 08:34PM

24
#257 - Sean Corr / @seanc01212

03/13/2022 at 12:04AM

24
#258 - Julio CPP / @jcaesarpp

03/19/2022 at 01:25AM

24
#259 - naomi (forgetful functor) / @fixedpointfae

03/29/2022 at 12:59AM

24
#260 - 그안합 / @asm6788_kor

04/15/2022 at 01:46PM

24
#261 - someone / @IKvacenok

06/14/2023 at 04:10PM

24
#262 - TANN1N / @TANN1N

04/12/2024 at 07:23AM

24
#263 - Hector Bjernersjö / @HectorBjernersjo

07/10/2024 at 12:30PM

24
#264 - Vivida / @Vivida1

10/01/2024 at 12:26PM

24
#265 - Pim / @Pireax

11/08/2024 at 03:56PM

24
#266 - diskeyd / @diskeyd

04/02/2025 at 10:39AM

25
#267 - Edgar Domingues / @edgar_domingues

07/23/2020 at 10:41AM

25
#268 - PoodleSkirt / @PoodleSkirt2

07/23/2020 at 08:14PM

25
#269 - TimMcGuire / @mcguire

07/25/2020 at 01:06AM

25
#270 - Olle Wiklund / @Kabix

07/30/2020 at 11:36AM