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

382 active golfers, 896 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

11
#275 - aisapatino / @aisapatino

12/09/2015 at 12:17AM

11
#276 - vimgolf / @myspare307

12/16/2015 at 07:26PM

11
#277 - Andy Loomis / @alumux

12/23/2015 at 11:51AM

11
#278 - Konrad Heidler / @MisterKono

12/26/2015 at 02:20PM

11
#279 - andrei / @CebotariAndrei

12/27/2015 at 10:05AM

11
#280 - Robert Clark / @rsclark2

12/31/2015 at 04:31PM

11
#281 - Sam Grigg / @samgrigg

12/31/2015 at 10:45PM

11
#282 - Luke Lancaster / @luketlancaster

01/05/2016 at 09:26PM

11
#283 - Sinclair Desaud / @sdesaud

01/06/2016 at 04:37PM

11
#284 - retro / @tryphopp

01/12/2016 at 02:33AM

11
#285 - Shalldök / @shalldoek

01/13/2016 at 02:23AM

11
#286 - bsjd / @bsjd

01/14/2016 at 12:53PM

11
#287 - KongFu / @_kongfu

01/16/2016 at 09:53AM

11
#288 - Jasbir Singh / @jasbirsingh11

01/16/2016 at 08:21PM

11
#289 - Lindsay Swift / @_lindsai_

01/17/2016 at 07:23PM

11
#290 - Morgan / @Mszy_

01/18/2016 at 09:51PM

11
#291 - Mor Zusman / @mor_zusman

01/21/2016 at 10:51PM

11
#292 - Etienne Tremel / @etiennetremel

02/06/2016 at 01:42PM

11
#293 - K Aravind Kumar / @ezbi_124

02/07/2016 at 03:58AM

11
#294 - Kevin Burns / @kburnsinfo

02/12/2016 at 01:43AM

11
#295 - ben kavanagh / @bkava

02/18/2016 at 06:26PM

11
#296 - Sebastian Pardo / @sebpardo

02/18/2016 at 08:06PM

11
#297 - John Finn / @johnvfinn7

02/19/2016 at 06:51AM

11
#298 - Kayne West / @portal_narlish

02/25/2016 at 05:52PM

11
#299 - Jaron Hamlik / @jdhamlik

02/27/2016 at 03:28AM

11
#300 - fzort / @fzort

02/28/2016 at 02:54PM