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

410 active golfers, 970 entries

Leaderboard (lowest score wins):
12
#361 - macmental / @macmental

12/18/2015 at 10:13PM

12
#362 - Jakob Schöttl / @jschoettl

12/31/2015 at 07:54AM

12
#363 - 白猫(zhu) / @cat2flower

06/04/2016 at 06:03PM

12
#364 - Timothy Caleb Nordlo / @tnordloh

06/27/2016 at 12:46AM

12
#365 - Ryan van Rensburg / @rdvr001

07/18/2016 at 07:29PM

12
#366 - Micha / @michman89

08/10/2016 at 10:55AM

12
#367 - Hans Yelek / @hans_yelek

01/11/2017 at 06:03AM

12
#368 - Gurukandhamoorthi / @Gurukandhamoor1

07/10/2017 at 02:09PM

12
#369 - grigouille / @grigouille2

07/11/2017 at 11:49AM

12
#370 - Joe Heywood / @joehabsjoe

12/22/2017 at 06:13PM

13
#371 - Stefan Reinhold / @iithron

12/14/2015 at 11:38AM

13
#372 - noname / @banxjal2

02/06/2016 at 05:44PM

13
#373 - Oliver Christ / @0liverChrist

07/12/2016 at 10:15PM

13
#374 - 杨洋 / @176795444

08/29/2017 at 12:11PM

13
#375 - Geoff / @RealGeoffErwin

10/09/2017 at 07:42PM

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

06/20/2018 at 03:55AM

13
#377 - niwatoco / @yoshitune9

07/23/2018 at 08:21PM

14
#378 - Danijel Mitar / @DanijelMitar

12/13/2015 at 04:49PM

14
#379 - Ben / @CubicPants

12/16/2015 at 11:20PM

14
#380 - twenty2twoss / @twenty2twoss

12/28/2015 at 07:24PM

14
#381 - 戸田 薫 / @KaoruToda

01/10/2016 at 04:14AM

14
#382 - TS / @tiredsounds

01/27/2016 at 04:28AM

14
#383 - faisal / @faisalhackshah

11/26/2018 at 06:45PM

14
#384 - Ethan Rietz / @EthanRietz

06/29/2021 at 01:59PM

15
#385 - Knarf / @Knarf93

12/10/2015 at 09:40PM

15
#386 - luffy / @raxcoi

12/20/2015 at 05:07PM

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

01/10/2016 at 07:32AM

17
#388 - Patrick Lavin / @LavinComputes

01/30/2019 at 09:35PM

17
#389 - albalitz / @_albalitz

06/06/2019 at 01:10PM

18
#390 - Charles Laber-Smith / @clabersmith

03/31/2016 at 04:49PM