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):
11
#331 - Alexander Gryson / @agryson

05/01/2017 at 03:55PM

11
#332 - Wang Wu / @rubepeg

05/12/2017 at 06:34AM

11
#333 - Chicuella / @chicuellahere

06/06/2017 at 01:28PM

11
#334 - Brandon Height / @Lask0x

08/08/2017 at 04:00AM

11
#335 - Paul Draghicescu / @pdragy

03/22/2018 at 10:41PM

11
#336 - ハヤシ / @0__098

07/25/2018 at 02:10PM

11
#337 - PJ Frazer / @pj_frazer

11/23/2018 at 09:34PM

11
#338 - timonegk / @timonegk

11/25/2018 at 08:50PM

11
#339 - churaki / @churaki

02/06/2019 at 11:35AM

12
#340 - Holden Lewis / @lonnez90

12/08/2015 at 08:33PM

12
#341 - macmental / @macmental

12/18/2015 at 10:13PM

12
#342 - Jakob Schöttl / @jschoettl

12/31/2015 at 07:54AM

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

06/04/2016 at 06:03PM

12
#344 - Timothy Caleb Nordlo / @tnordloh

06/27/2016 at 12:46AM

12
#345 - Ryan van Rensburg / @rdvr001

07/18/2016 at 07:29PM

12
#346 - Micha / @michman89

08/10/2016 at 10:55AM

12
#347 - Hans Yelek / @hans_yelek

01/11/2017 at 06:03AM

12
#348 - Gurukandhamoorthi / @Gurukandhamoor1

07/10/2017 at 02:09PM

12
#349 - grigouille / @grigouille2

07/11/2017 at 11:49AM

12
#350 - Joe Heywood / @joehabsjoe

12/22/2017 at 06:13PM

13
#351 - Stefan Reinhold / @iithron

12/14/2015 at 11:38AM

13
#352 - noname / @banxjal2

02/06/2016 at 05:44PM

13
#353 - Oliver Christ / @0liverChrist

07/12/2016 at 10:15PM

13
#354 - 杨洋 / @176795444

08/29/2017 at 12:11PM

13
#355 - Geoff / @RealGeoffErwin

10/09/2017 at 07:42PM

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

06/20/2018 at 03:55AM

13
#357 - niwatoco / @yoshitune9

07/23/2018 at 08:21PM

14
#358 - Danijel Mitar / @DanijelMitar

12/13/2015 at 04:49PM

14
#359 - Ben / @CubicPants

12/16/2015 at 11:20PM

14
#360 - twenty2twoss / @twenty2twoss

12/28/2015 at 07:24PM