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

484 active golfers, 2448 entries

Leaderboard (lowest score wins):
21
#181 - mevmev / @mevmev8

09/13/2020 at 02:06PM

21
#182 - Алексей Ковалев / @FrostMephi

09/24/2020 at 08:46PM

21
#183 - Brad Hubbard / @BradHubbard19

10/06/2020 at 06:02AM

21
#184 - lamtt77 / @lamtt77

10/07/2020 at 09:40AM

21
#185 - chocolate / @chocola81394123

10/23/2020 at 07:06AM

21
#186 - FrolPaderin / @FPaderin

11/08/2020 at 02:10PM

21
#187 - Michał / @Micha46184564

11/15/2020 at 07:16PM

21
#188 - Björn Struckmeier / @BjrnStruckmeie1

01/03/2021 at 12:38PM

21
#189 - Francois Marais / @maraisf

05/18/2021 at 11:29AM

21
#190 - Georg Bökman / @BokmanGeorg

07/03/2021 at 09:36PM

21
#191 - Michel Viktor / @tomkpz

08/08/2021 at 09:45PM

21
#192 - 박세영 / @bagseyeong10

11/26/2021 at 08:20AM

21
#193 - 박기창 / @baggichang3

12/02/2021 at 11:25AM

21
#194 - unknown / @dongtaiwang1989

12/04/2021 at 03:55PM

21
#195 - Humbaba / @humbabu

01/04/2022 at 07:56PM

21
#196 - Youssef Magdy / @youssef_magdy29

04/30/2022 at 10:10PM

21
#197 - e_e / @eleloi

02/13/2023 at 10:15PM

21
#198 - naka / @nak38223985244

11/21/2023 at 01:24PM

21
#199 - asirago / @asiragoo

12/13/2023 at 07:59AM

21
#200 - かみひろ / @km_hr

03/16/2024 at 02:11PM

21
#201 - Some-thing / @AngolMinsu

04/08/2024 at 12:04PM

21
#202 - Dal_Peng / @dalpang81

04/09/2024 at 03:04PM

21
#203 - 0spear / @0spear

04/10/2024 at 01:17PM

21
#204 - jiwon_kim / @Ji1WonKim

04/13/2024 at 12:04PM

21
#205 - 깔깔 / @dddh8204

04/13/2024 at 11:11PM

21
#206 - kanguk123 / @kanguk123

03/29/2025 at 05:12PM

22
#207 - Yannick / @Yannick88147038

07/16/2020 at 06:39PM

22
#208 - Saki Gw / @Sakigw

07/17/2020 at 07:48AM

22
#209 - Richard Lowe / @b0ggyb33

07/17/2020 at 02:06PM

22
#210 - Saurabh / @Saurabh09299

07/19/2020 at 01:20PM