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):
42
#451 - brianhotopp / @brianhotopp

07/20/2020 at 11:36PM

42
#452 - Kaustubh Murumkar / @k_austub_h

09/21/2020 at 02:23PM

42
#453 - kontonavn / @kontonavn2

01/16/2021 at 11:17PM

42
#454 - 梅 / @umetosawara

04/17/2022 at 08:28AM

42
#455 - 卞承德 / @bianchengde1

06/16/2022 at 03:26PM

42
#456 - ishj00 / @ishj00

04/01/2025 at 01:56PM

43
#457 - Kevin Linnane / @linnanekevin07

12/30/2020 at 11:09PM

44
#458 - Graic / @Griac628

07/24/2020 at 06:41AM

44
#459 - Ben Wainwright / @benwainwrightuk

09/26/2020 at 01:55PM

44
#460 - Leo sunil / @tomyail

12/07/2020 at 06:07AM

45
#461 - Dane / @studdugie

07/27/2020 at 06:32PM

45
#462 - ZackBurtAWS / @ZackBurtSDE

09/22/2020 at 03:13PM

45
#463 - LJ / @LiterallyJohnny

12/12/2020 at 06:49PM

45
#464 - boom / @boom40668011

12/22/2021 at 08:24PM

45
#465 - sequel / @sequel25

01/19/2022 at 07:01PM

45
#466 - rlatmdgk1203 / @rlatmdgk1203

03/27/2025 at 01:22AM

46
#467 - 伟哥 / @w15659018558

09/15/2020 at 08:22AM

48
#468 - vesa / @XingfDu

01/14/2021 at 06:22AM

50
#469 - 莊秉澂 / @cYZAfEdeAPRsh7G

09/20/2020 at 06:47AM

50
#470 - just here to scroll. / @idontknow0001

10/03/2020 at 01:16PM

51
#471 - 雷 / @xb_I_dx

03/04/2023 at 08:00AM

55
#472 - pong / @mr_pongpong

12/28/2020 at 02:10PM

56
#473 - Chinmay Dalal / @p00fd

08/14/2020 at 04:10PM

57
#474 - Nitesh Rijhwani / @NitzRijhwani

01/05/2021 at 03:48PM

58
#475 - 深窓の令嬢@ドクター / @arbino1031

03/20/2021 at 06:13AM

62
#476 - Anil Narayan / @AnilNarayan2013

08/07/2020 at 04:12AM

62
#477 - Davarco / @Davarco2

03/02/2022 at 07:42AM

63
#478 - Diven Young / @YoungDiven

10/26/2020 at 07:56AM

70
#479 - Álvaro Silva / @ricostynha1

07/25/2024 at 09:23PM

140
#480 - Christopher Williams / @chrstphrsnw

12/01/2021 at 10:36PM