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):
22
#211 - Norman Liu / @normanwliu

07/25/2020 at 10:19PM

22
#212 - GenericHardwareGamer / @GnrikHrdwrGamer

08/04/2020 at 08:59AM

22
#213 - Epecb / @BceEpecb

09/24/2020 at 10:00PM

22
#214 - genoskill / @Genoskill

09/26/2020 at 12:23AM

22
#215 - ✨ / @startresse

10/07/2020 at 07:59PM

22
#216 - POSIX / @po6ix

01/07/2022 at 01:14AM

23
#217 - matteo / @matteo55169132

07/20/2020 at 12:15AM

23
#218 - Gergely Risko / @errge

07/28/2020 at 07:55PM

23
#219 - Fergus Longley / @FergusLongley

08/03/2020 at 10:53AM

23
#220 - Vinícius Hoyer / @viniciushoyer

08/28/2020 at 02:50PM

23
#221 - wilsonept / @wilsonept1

10/24/2020 at 06:50PM

23
#222 - Zack Freedman / @freedman_zack

11/08/2020 at 03:09PM

23
#223 - John Doe / @JohnDoe75830353

12/21/2020 at 08:23PM

23
#224 - models / @zornificator

06/23/2021 at 10:12AM

23
#225 - vimgolf_vinz / @VimgolfV

09/19/2021 at 09:40AM

23
#226 - AMG / @anmigneer

12/14/2021 at 01:07PM

23
#227 - BowTiedCoin / @BowTiedCoin

02/14/2022 at 11:31AM

23
#228 - Auri Iodide / @auri_iodide

03/08/2022 at 05:08AM

23
#229 - yeom / @yeomhuigeon

04/14/2022 at 04:39AM

23
#230 - キムラ・OPEL・ユウジ / @kimurayuuji79

11/16/2022 at 03:50AM

23
#231 - 0xf00ff00f / @0xf00ff00f

12/17/2022 at 08:21PM

24
#232 - dadav 🥀 / @__dadav__

07/16/2020 at 02:29PM

24
#233 - Aioriya / @AioriyaDonk

07/19/2020 at 02:14AM

24
#234 - Leandro Lourenci / @lourenci

07/19/2020 at 11:48PM

24
#235 - Sergey Averkiev / @ExAnimoso

07/23/2020 at 02:03PM

24
#236 - Daniel Habib / @danielhvs

07/23/2020 at 10:24PM

24
#237 - Andy Yang / @yzwdroid

07/24/2020 at 03:45AM

24
#238 - 임덕윤 / @SnLHUF5ZYJXqI1m

07/26/2020 at 10:57AM

24
#239 - Nicolas Marier / @NicMarier

08/07/2020 at 12:01AM

24
#240 - santrupta mishra / @talkedgrain8

08/15/2020 at 03:03PM