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):
10
#271 - wrglprmft1 / @wrglprmft1

01/26/2019 at 03:06PM

10
#272 - Mateen Ulhaq / @sicariusnoctis

02/16/2019 at 11:57PM

10
#273 - Titouan Teyssier / @TitouanT_

04/09/2019 at 11:28PM

10
#274 - Grant / @grant_7788

05/13/2019 at 08:59AM

10
#275 - Дима / @dimkino

05/31/2019 at 10:22AM

10
#276 - majo senf / @majo_senf

06/18/2019 at 01:34PM

10
#277 - garry quested / @GQuested

07/21/2019 at 06:52AM

10
#278 - Chester Yap / @Chest_ErYap

08/15/2019 at 10:18PM

10
#279 - Foo Bar / @foobar01123

08/25/2019 at 08:25AM

11
#280 - aisapatino / @aisapatino

12/09/2015 at 12:17AM

11
#281 - vimgolf / @myspare307

12/16/2015 at 07:26PM

11
#282 - Andy Loomis / @alumux

12/23/2015 at 11:51AM

11
#283 - Konrad Heidler / @MisterKono

12/26/2015 at 02:20PM

11
#284 - andrei / @CebotariAndrei

12/27/2015 at 10:05AM

11
#285 - Robert Clark / @rsclark2

12/31/2015 at 04:31PM

11
#286 - Sam Grigg / @samgrigg

12/31/2015 at 10:45PM

11
#287 - Luke Lancaster / @luketlancaster

01/05/2016 at 09:26PM

11
#288 - Sinclair Desaud / @sdesaud

01/06/2016 at 04:37PM

11
#289 - retro / @tryphopp

01/12/2016 at 02:33AM

11
#290 - Shalldök / @shalldoek

01/13/2016 at 02:23AM

11
#291 - bsjd / @bsjd

01/14/2016 at 12:53PM

11
#292 - KongFu / @_kongfu

01/16/2016 at 09:53AM

11
#293 - Jasbir Singh / @jasbirsingh11

01/16/2016 at 08:21PM

11
#294 - Lindsay Swift / @_lindsai_

01/17/2016 at 07:23PM

11
#295 - Morgan / @Mszy_

01/18/2016 at 09:51PM

11
#296 - Mor Zusman / @mor_zusman

01/21/2016 at 10:51PM

11
#297 - Etienne Tremel / @etiennetremel

02/06/2016 at 01:42PM

11
#298 - K Aravind Kumar / @ezbi_124

02/07/2016 at 03:58AM

11
#299 - Kevin Burns / @kburnsinfo

02/12/2016 at 01:43AM

11
#300 - ben kavanagh / @bkava

02/18/2016 at 06:26PM