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 5666943bac55c907fd02066f

comments galore

Basic comment reformatting

Start file
/*
 * comments
 * yay comments
 * so informative, the information is really yes
 * wowowowowow
 * mind blown
 * and that's how the allocator works
 */
End file
// comments
// yay comments
// so informative, the information is really yes
// wowowowowow
// mind blown
// and that's how the allocator works

View Diff

1,8c1,6
< /*
<  * comments
<  * yay comments
<  * so informative, the information is really yes
<  * wowowowowow
<  * mind blown
<  * and that's how the allocator works
<  */
---
> // comments
> // yay comments
> // so informative, the information is really yes
> // wowowowowow
> // mind blown
> // and that's how the allocator works

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 367 remaining solutions by signing in and submitting your own entry
#368 Jay Hack / @_jayhack_ - Score: 68 - 12/18/15 @ 04:14
dd7ggdd:%i<BS>A<BS>I//<BS><BS><BS><BS>%s/*<BS>\*//<BS>\/\/<CR><Up><Up><Up><Up><Up><BS>x<Down>xjxjxjxjxjkkkkkjjjjjj:wq<CR>

0 comments


Created by: @tedsta0

368 active golfers, 854 entries

Leaderboard (lowest score wins):
12
#331 - Hans Yelek / @hans_yelek

01/11/2017 at 06:03AM

12
#332 - Gurukandhamoorthi / @Gurukandhamoor1

07/10/2017 at 02:09PM

12
#333 - grigouille / @grigouille2

07/11/2017 at 11:49AM

12
#334 - Joe Heywood / @joehabsjoe

12/22/2017 at 06:13PM

13
#335 - Stefan Reinhold / @iithron

12/14/2015 at 11:38AM

13
#336 - noname / @banxjal2

02/06/2016 at 05:44PM

13
#337 - Oliver Christ / @0liverChrist

07/12/2016 at 10:15PM

13
#338 - 杨洋 / @176795444

08/29/2017 at 12:11PM

13
#339 - Geoff / @RealGeoffErwin

10/09/2017 at 07:42PM

13
#340 - 赤佐田奈葉 / @akasatanaha_

06/20/2018 at 03:55AM

13
#341 - niwatoco / @yoshitune9

07/23/2018 at 08:21PM

14
#342 - Danijel Mitar / @DanijelMitar

12/13/2015 at 04:49PM

14
#343 - Ben / @CubicPants

12/16/2015 at 11:20PM

14
#344 - twenty2twoss / @twenty2twoss

12/28/2015 at 07:24PM

14
#345 - 戸田 薫 / @KaoruToda

01/10/2016 at 04:14AM

14
#346 - TS / @tiredsounds

01/27/2016 at 04:28AM

15
#347 - Knarf / @Knarf93

12/10/2015 at 09:40PM

15
#348 - luffy / @raxcoi

12/20/2015 at 05:07PM

16
#349 - (´ ・ω・`) / @zenmou

01/10/2016 at 07:32AM

18
#350 - Charles Laber-Smith / @clabersmith

03/31/2016 at 04:49PM

19
#351 - Mendel Simon / @agentms11

12/08/2015 at 01:17PM

19
#352 - Bence Béky / @bence_beky

12/11/2015 at 12:04AM

19
#353 - z0c / @zerocabal

06/06/2018 at 03:58PM

20
#354 - Mike McGowan / @mikemcgowan75

12/18/2015 at 02:24PM

21
#355 - Theodore DeRego / @tedsta0

12/08/2015 at 08:31AM

21
#356 - Tom Biskup / @Tombisk

07/30/2018 at 09:54PM

21
#357 - Brent Woo / @BrentPWoo

10/02/2018 at 03:39PM

21
#358 - Jurica / @Jurica34581259

11/16/2018 at 01:16PM

22
#359 - El Achèche ANIS / @elacheche

12/14/2015 at 05:48PM

22
#360 - Matt Walsh / @wattmalsh

02/13/2017 at 05:25AM