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):
24
#241 - Josh Kermond / @Kermond

08/21/2020 at 05:29AM

24
#242 - s3cy / @s3cyxx

08/23/2020 at 11:28AM

24
#243 - Marcio M Pereira / @iviarcio

08/23/2020 at 06:17PM

24
#244 - Anton Kriese / @AntonKriese

09/10/2020 at 07:18AM

24
#245 - Alex Watson / @AlexDewiWatson

12/01/2020 at 03:00PM

24
#246 - Thomas Lüdecke / @t0mM3k

01/21/2021 at 12:03PM

24
#247 - Ethan Rietz / @EthanRietz

06/28/2021 at 04:36PM

24
#248 - thari.eth / @thari_eth

11/14/2021 at 12:23PM

24
#249 - Marcel Funderák / @fundosh

03/12/2022 at 08:34PM

24
#250 - Sean Corr / @seanc01212

03/13/2022 at 12:04AM

24
#251 - Julio CPP / @jcaesarpp

03/19/2022 at 01:25AM

24
#252 - naomi (forgetful functor) / @fixedpointfae

03/29/2022 at 12:59AM

24
#253 - 그안합 / @asm6788_kor

04/15/2022 at 01:46PM

24
#254 - someone / @IKvacenok

06/14/2023 at 04:10PM

24
#255 - TANN1N / @TANN1N

04/12/2024 at 07:23AM

24
#256 - Hector Bjernersjö / @HectorBjernersjo

07/10/2024 at 12:30PM

24
#257 - Vivida / @Vivida1

10/01/2024 at 12:26PM

24
#258 - Pim / @Pireax

11/08/2024 at 03:56PM

24
#259 - diskeyd / @diskeyd

04/02/2025 at 10:39AM

25
#260 - Edgar Domingues / @edgar_domingues

07/23/2020 at 10:41AM

25
#261 - PoodleSkirt / @PoodleSkirt2

07/23/2020 at 08:14PM

25
#262 - TimMcGuire / @mcguire

07/25/2020 at 01:06AM

25
#263 - Olle Wiklund / @Kabix

07/30/2020 at 11:36AM

25
#264 - Владек / @escept1c

08/12/2020 at 02:21AM

25
#265 - knoebber / @knoebber1

08/21/2020 at 05:22PM

25
#266 - Nick Kirkby / @driftregion

08/28/2020 at 01:50AM

25
#267 - Robert Verst / @r_verst

09/01/2020 at 12:41PM

25
#268 - Sebastian W. / @Sebasti91439242

09/01/2020 at 06:28PM

25
#269 - Luc Kien Hang / @luckienhang

09/03/2020 at 07:40PM

25
#270 - Blipss / @BlipSound

09/11/2020 at 02:28PM