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 387 remaining solutions by signing in and submitting your own entry
#388 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

388 active golfers, 908 entries

Leaderboard (lowest score wins):
14
#361 - 戸田 薫 / @KaoruToda

01/10/2016 at 04:14AM

14
#362 - TS / @tiredsounds

01/27/2016 at 04:28AM

14
#363 - faisal / @faisalhackshah

11/26/2018 at 06:45PM

15
#364 - Knarf / @Knarf93

12/10/2015 at 09:40PM

15
#365 - luffy / @raxcoi

12/20/2015 at 05:07PM

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

01/10/2016 at 07:32AM

17
#367 - Patrick Lavin / @LavinComputes

01/30/2019 at 09:35PM

17
#368 - albalitz / @_albalitz

06/06/2019 at 01:10PM

18
#369 - Charles Laber-Smith / @clabersmith

03/31/2016 at 04:49PM

19
#370 - Mendel Simon / @agentms11

12/08/2015 at 01:17PM

19
#371 - Bence Béky / @bence_beky

12/11/2015 at 12:04AM

19
#372 - z0c / @zerocabal

06/06/2018 at 03:58PM

20
#373 - Mike McGowan / @mikemcgowan75

12/18/2015 at 02:24PM

21
#374 - Theodore DeRego / @tedsta0

12/08/2015 at 08:31AM

21
#375 - Tom Biskup / @Tombisk

07/30/2018 at 09:54PM

21
#376 - Brent Woo / @BrentPWoo

10/02/2018 at 03:39PM

21
#377 - Jurica / @Jurica34581259

11/16/2018 at 01:16PM

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

12/14/2015 at 05:48PM

22
#379 - Matt Walsh / @wattmalsh

02/13/2017 at 05:25AM

22
#380 - Shunichi Kanade / @shunkana

12/02/2018 at 09:58AM

23
#381 - Oser / @thegolfer8

01/01/2016 at 01:07AM

27
#382 - Alexander Ryzhikov / @Coobaha

01/05/2016 at 06:18PM

28
#383 - atemyda-4959 / @atemyda

12/09/2015 at 10:32AM

29
#384 - Luke / @toy_lang_smell

01/01/2017 at 05:37AM

31
#385 - Eshan Singh / @SinghEshansingh

12/22/2015 at 10:46AM

32
#386 - Lucas McDaniel / @Ldmcdaniel109

01/21/2016 at 09:36PM

54
#387 - Christopher Wells / @ExcaliburZero_Z

12/11/2015 at 12:05PM

68
#388 - Jay Hack / @_jayhack_

12/18/2015 at 04:14AM