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):
20
#31 - Filipe Brandenburger / @filbranden

08/03/2020 at 04:16PM

20
#32 - Alek Mugnozzo / @mugnozzo

08/07/2020 at 08:42AM

20
#33 - Vinay Sharma / @VinaySh63956554

08/08/2020 at 03:40PM

20
#34 - Du Phan / @fehiepsi

08/08/2020 at 05:50PM

20
#35 - Kazuki / @algo__n

08/09/2020 at 09:58AM

20
#36 - Ivan Kwong / @IvanKwong5

08/09/2020 at 12:59PM

20
#37 - Tanzeel Kazi / @tanzeelkazi

08/11/2020 at 04:41AM

20
#38 - João Pedro B Nadas / @jpnadas

08/15/2020 at 09:29AM

20
#39 - Tomas / @Tombakas

08/15/2020 at 10:26AM

20
#40 - Cao Van Bi / @CaoVanBi235

08/16/2020 at 02:28AM

20
#41 - platypusDancing / @platypusDancing

08/16/2020 at 03:20AM

20
#42 - Łukasz Kadłubowski / @LAKadlubowski

08/21/2020 at 05:04AM

20
#43 - Ihor / @Ihor96382508

08/22/2020 at 10:14AM

20
#44 - fenn.stefan@gmail.com / @FennStefan

08/25/2020 at 07:45PM

20
#45 - Matthew Blode / @BlodeMatthew

08/26/2020 at 07:22AM

20
#46 - Blake Tereau / @BlakeTereau

08/26/2020 at 09:44PM

20
#47 - Udbhav Muthakana / @udbhavm_

08/27/2020 at 02:21AM

20
#48 - Tom Dalling / @tom_dalling

08/30/2020 at 01:58PM

20
#49 - dezhonger / @dezhonger

08/31/2020 at 06:21PM

20
#50 - 王有铭 / @wangyouming1209

09/03/2020 at 04:20AM

20
#51 - akouryy / @akouryy1

09/05/2020 at 07:36AM

20
#52 - 刘宏亮 / @AkeyCoy

09/08/2020 at 03:23AM

20
#53 - M / @M88566443

09/08/2020 at 08:17PM

20
#54 - Anton Kriese / @KrieseAnton

09/10/2020 at 07:45AM

20
#55 - Piotr Kaznowski / @kaznowski

09/13/2020 at 04:37PM

20
#56 - FunkyKoval / @FunkyKoval10

09/16/2020 at 12:57PM

20
#57 - Aaron Cooley / @acoolz

09/20/2020 at 03:55AM

20
#58 - as-night / @asnight2

09/23/2020 at 01:09PM

20
#59 - Fransis / @fransisnk

09/25/2020 at 06:28PM

20
#60 - Jan Liu / @Jagsomarjan

09/29/2020 at 04:21PM