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):
26
#301 - Mystic / @aw0D5RUrdmxsylt

04/13/2024 at 06:01PM

26
#302 - KoroneListener / @KoroneListener

09/04/2024 at 04:45PM

26
#303 - SRINIVASU SALADI / @SRINIVASUS22587

01/23/2025 at 02:18PM

26
#304 - woozhin / @woozhin

04/01/2025 at 10:19AM

27
#305 - Joren Van Hee / @jorenvanhee

07/16/2020 at 02:52PM

27
#306 - Seve / @Seve_py

07/16/2020 at 04:43PM

27
#307 - Fabien C. / @vaga_io

07/17/2020 at 09:33AM

27
#308 - Ron-Shan,Chang / @highlupin

07/21/2020 at 11:33AM

27
#309 - Καράτε Μόνο / @karate_mono

07/22/2020 at 09:09AM

27
#310 - Matty / @_bigaku

07/25/2020 at 08:06PM

27
#311 - Arne Winter / @ArneWinter5

08/02/2020 at 01:01PM

27
#312 - haipeng li / @HaipengLie

08/02/2020 at 02:11PM

27
#313 - Max Minaev / @max_minaev11

08/04/2020 at 09:07AM

27
#314 - mindgitrwx / @mindgitrwx

08/09/2020 at 01:50PM

27
#315 - Luis Rodriguez / @luisthecoder

08/20/2020 at 11:31AM

27
#316 - TheSemicolon / @the_semicolon_

09/09/2020 at 09:03AM

27
#317 - Alexander Flick / @alexflick

10/02/2020 at 04:05AM

27
#318 - The Valencian Dev / @thevalenciandev

10/12/2020 at 09:25AM

27
#319 - dragonofdeath / @dragonofdeath8

10/16/2020 at 01:27PM

27
#320 - Mike Harris / @MikeMJHarris

10/16/2020 at 04:33PM

27
#321 - roy twt / @roytwt1

10/18/2020 at 12:38PM

27
#322 - __VimGolfer__ / @VimGolfer19

11/30/2020 at 06:06PM

27
#323 - Vivian Liang / @vivianpliang

12/15/2020 at 10:09PM

27
#324 - A White Dwarf / @AWhiteDwarf1

06/28/2021 at 06:36PM

27
#325 - Joshua Marple / @JoshuaMarple1

12/17/2021 at 04:40PM

27
#326 - makita0x01 / @Makita81234049

03/11/2022 at 06:51AM

27
#327 - steve / @steve35773420

11/20/2022 at 01:35PM

27
#328 - Austin Willliams / @GuitarMusash616

11/24/2022 at 07:27AM

27
#329 - gpfl0712 / @gpfl0712

04/13/2024 at 10:35PM

27
#330 - UrbanNinja1010 / @UrbanNinja1010

04/04/2025 at 03:07PM