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):
25
#271 - Sean Dewar / @seandewar

09/18/2020 at 08:57PM

25
#272 - stanley förster / @stnlyfrstr

09/23/2020 at 07:48AM

25
#273 - Alice / @Alice92541388

09/28/2020 at 06:13PM

25
#274 - Viktor Styrud / @ViktorStyrud

09/29/2020 at 10:19AM

25
#275 - mstronam / @mstronam

09/30/2020 at 05:01PM

25
#276 - Paul Inc / @hiniol1982

10/04/2020 at 06:02PM

25
#277 - Der Natsch / @dernatsch

10/06/2020 at 10:02PM

25
#278 - whale / @Hari84444713

11/14/2020 at 12:18AM

25
#279 - angel / @anmaso

12/06/2020 at 09:50PM

25
#280 - pherapont / @pherapont1

12/22/2020 at 11:53AM

25
#281 - zapakh / @zapakh

01/21/2021 at 04:41AM

25
#282 - OtterPy / @OtterPy

01/26/2021 at 05:28PM

25
#283 - ff df / @ffdf93207177

04/18/2022 at 04:07AM

25
#284 - vimgolfaccfekxh / @vimgolfaccfekxh

10/30/2022 at 02:33PM

25
#285 - Sébastien Matharel / @s_cognac

10/25/2023 at 12:53PM

25
#286 - yge / @card-yun

04/14/2024 at 08:57AM

26
#287 - Sam Houston / @shouston33

07/29/2020 at 09:53PM

26
#288 - Martin Kauppinen / @MartinKauppinen

08/15/2020 at 09:03AM

26
#289 - Ryan / @ryan_lardinois

09/06/2020 at 11:54PM

26
#290 - Pepe / @PedroVassena

09/08/2020 at 06:41AM

26
#291 - JP / @JP16366170

09/08/2020 at 10:57AM

26
#292 - BryanYan / @BryanGoesPlaces

09/29/2020 at 04:19PM

26
#293 - Arijus / @argshook

10/16/2020 at 01:23PM

26
#294 - Gytis Vinclovas / @GytisVinclovas

10/16/2020 at 01:31PM

26
#295 - — / @Cenarius

12/07/2020 at 02:18AM

26
#296 - fray bauhaus / @BauhausFray

01/18/2021 at 11:22PM

26
#297 - 야통이 / @gonnanailedit

12/03/2021 at 06:31PM

26
#298 - ._. / @Katharsic

04/25/2022 at 03:12PM

26
#299 - James / @Dronak

12/02/2022 at 05:15PM

26
#300 - 권민재 / @gommj0611

04/07/2023 at 07:53AM