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
#121 - ya-suke / @ysxninja

02/11/2022 at 02:37PM

20
#122 - Brett Bender / @brttbndr

02/25/2022 at 04:53PM

20
#123 - nd183 / @nd1832

03/07/2022 at 02:36PM

20
#124 - nr k / @nrk14992741

04/02/2022 at 12:03PM

20
#125 - mold mild / @mild_mold

04/02/2022 at 01:52PM

20
#126 - 황시준_2771 / @ilPp5j1wfhKSFHr

04/04/2022 at 02:31AM

20
#127 - Choi Eun Chang / @fateflyec

04/04/2022 at 11:51AM

20
#128 - 심우현 / @tmvlem5671

04/05/2022 at 11:14AM

20
#129 - 지형 유 / @O_hr_good7

04/05/2022 at 05:19PM

20
#130 - w1ck3r / @w1ck3r_dr0p

04/08/2022 at 01:05PM

20
#131 - 벚꽃 / @beojkkoch3

04/09/2022 at 03:21AM

20
#132 - Ji_Hyeong / @PlzstopIT7

04/11/2022 at 03:23PM

20
#133 - 김가윤 / @qweru38010687

04/13/2022 at 11:20AM

20
#134 - co_hyo / @co_hyo

04/13/2022 at 06:26PM

20
#135 - Chris Bash / @Bash_Chris1

04/15/2022 at 01:55PM

20
#136 - 황다민 / @ghkdekals

04/15/2022 at 05:30PM

20
#137 - 할핳 / @vimgolfYOUNG

04/16/2022 at 03:57AM

20
#138 - 최최대로 / @Jaenedir

04/16/2022 at 08:24AM

20
#139 - cho / @cho_liaa

04/17/2022 at 07:39AM

20
#140 - 구이공 / @CdP60ouZ6hhcHMG

04/17/2022 at 01:01PM

20
#141 - russellzhaomao / @russellzhaomao

05/23/2022 at 07:30AM

20
#142 - Alex / @AlexanderHeatl2

07/06/2022 at 08:59PM

20
#143 - Janzen / @__Coos

09/14/2022 at 08:37AM

20
#144 - Marco Meinardi / @Kee__no

12/30/2022 at 09:02PM

20
#145 - FirstModus / @Nolimimer

03/26/2023 at 09:59PM

20
#146 - 성우 / @seongu85669455

04/03/2023 at 04:38PM

20
#147 - someperson150 / @someperson150

06/30/2023 at 05:33PM

20
#148 - quasineutral / @quasineutral

08/10/2023 at 11:48AM

20
#149 - moh ayaya / @AyayaMoh

08/27/2023 at 04:58PM

20
#150 - Luoyb / @Luoyb

10/26/2023 at 01:56AM