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):
33
#391 - Leander Hendrikx / @leanderhendrikx

11/22/2020 at 10:14AM

33
#392 - Joe Farnsworth / @JoeFarnsworth

06/21/2021 at 10:36PM

33
#393 - ココアサ / @zAxLcKjTWc6aP6P

12/03/2021 at 02:22PM

33
#394 - 박덕구 / @bagdeoggu

12/05/2021 at 07:00AM

33
#395 - Aiden Yang / @aidenyangnn

01/18/2022 at 08:08AM

34
#396 - John Galt / @JohnGalt24

07/21/2020 at 02:09PM

34
#397 - Jose / @Esnaque

07/28/2020 at 03:41PM

34
#398 - Seth Y / @RealNancyReagan

08/22/2020 at 02:14PM

34
#399 - Lawrence Long / @lawrenceylong

08/23/2020 at 05:18AM

34
#400 - Kleyton Nascimento / @kleytonstn

08/31/2020 at 11:56AM

34
#401 - Pieter-Jan Lavaerts / @Pumpkin_Pie_Eat

09/15/2020 at 02:33PM

34
#402 - William Burns / @_william_burns

09/30/2020 at 02:23PM

34
#403 - Mickaël Menu / @mickaelmenu

10/24/2020 at 09:36PM

34
#404 - dvorak4tzx / @dvorak4tzx4

12/28/2020 at 05:02PM

34
#405 - Chun Chanjun / @CChanjun

11/19/2021 at 03:37PM

34
#406 - 윤경호 / @GH_Yun2

12/05/2021 at 12:48PM

34
#407 - Yochem van Rosmalen / @yoch3m

01/30/2022 at 08:28PM

34
#408 - Fabian Becker 🇩🇪 / @geekproject

02/08/2022 at 10:10PM

34
#409 - Gerard Keane / @gerardkeane

05/20/2024 at 11:33AM

35
#410 - Trevor Hulsman / @trevorhulsman

08/02/2020 at 10:52PM

35
#411 - Thiago Becker / @beckert

08/03/2020 at 02:15PM

35
#412 - elroylee / @elroylee11

08/22/2020 at 11:26PM

35
#413 - Ali Aslan / @AliAsla95742367

08/25/2020 at 04:56AM

35
#414 - Emil Abraham / @emil1414

09/22/2020 at 08:33PM

35
#415 - Asbjørn Riddervold / @ARiddervold

10/11/2020 at 07:18PM

35
#416 - Ramūnas Musteikis / @RamnasMusteiki1

10/16/2020 at 01:27PM

35
#417 - Muradil / @MuradilUdun

10/21/2020 at 03:16PM

35
#418 - Laura Skillington / @lauraskills1

12/10/2020 at 09:25PM

35
#419 - bladehaze / @bladehaze

12/24/2020 at 07:35AM

35
#420 - Nikita Evdokimov / @EvdokimovN

05/13/2021 at 04:45PM