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

367 active golfers, 849 entries

Leaderboard (lowest score wins):
11
#301 - Defts = DvToons / @defts

03/27/2016 at 05:22PM

11
#302 - Chenut Ludovic / @7Brwa7

04/05/2016 at 11:26AM

11
#303 - Clémence / @Clemence_Neoxia

04/12/2016 at 07:27AM

11
#304 - Matteo Signer / @MatteoSigner

04/12/2016 at 12:47PM

11
#305 - John Smith / @JohnSmith448816

05/15/2016 at 10:49PM

11
#306 - Sanjay / @patelsan

06/19/2016 at 04:10PM

11
#307 - Ram Tamtam / @ramtamtamtam

06/22/2016 at 01:51PM

11
#308 - malet / @Malet

06/24/2016 at 10:04PM

11
#309 - Dan Madden / @guthran

07/15/2016 at 03:30PM

11
#310 - javier castro / @eusipial

09/17/2016 at 04:31AM

11
#311 - Daniel Bellenger / @DanielBellenger

09/30/2016 at 06:51PM

11
#312 - Kyouma / @kyoumaJohn

10/14/2016 at 03:04PM

11
#313 - holy_sin / @0zero0

12/16/2016 at 04:36AM

11
#314 - Yann / @yannstadnicki

02/21/2017 at 05:46AM

11
#315 - Daniel / @Daniel00288663

03/21/2017 at 10:02AM

11
#316 - caplod / @caplod

03/26/2017 at 09:59AM

11
#317 - Alexander Gryson / @agryson

05/01/2017 at 03:55PM

11
#318 - Wang Wu / @rubepeg

05/12/2017 at 06:34AM

11
#319 - Chicuella / @chicuellahere

06/06/2017 at 01:28PM

11
#320 - Brandon Height / @Lask0x

08/08/2017 at 04:00AM

11
#321 - Paul Draghicescu / @pdragy

03/22/2018 at 10:41PM

11
#322 - ハヤシ / @0__098

07/25/2018 at 02:10PM

12
#323 - h l / @lonnez90

12/08/2015 at 08:33PM

12
#324 - macmental / @macmental

12/18/2015 at 10:13PM

12
#325 - Jakob Schöttl / @jschoettl

12/31/2015 at 07:54AM

12
#326 - wall2flower / @wall2flower

06/04/2016 at 06:03PM

12
#327 - Timothy Caleb Nordlo / @tnordloh

06/27/2016 at 12:46AM

12
#328 - Ryan van Rensburg / @rdvr001

07/18/2016 at 07:29PM

12
#329 - Micha / @michman89

08/10/2016 at 10:55AM

12
#330 - Hans Yelek / @hans_yelek

01/11/2017 at 06:03AM