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

375 active golfers, 870 entries

Leaderboard (lowest score wins):
10
#211 - Michał Dytko / @DytkoM

12/21/2016 at 09:17AM

10
#212 - sijinyuan / @sijinyuan

02/20/2017 at 01:39AM

10
#213 - Alexander Bessonov / @nonsleepr

03/15/2017 at 09:27PM

10
#214 - Mitchell / @Spitchell

03/18/2017 at 04:22PM

10
#215 - Ilya Shakirov / @aelaau

03/22/2017 at 09:22AM

10
#216 - Миша Сорокин / @rafmikovi4

04/10/2017 at 02:02PM

10
#217 - Colby Hamilton / @ColbyHamilton5

04/25/2017 at 07:06PM

10
#218 - 梧桐王子 / @WutongYujie

04/27/2017 at 05:36AM

10
#219 - Brian Hall / @_bruab_

05/04/2017 at 01:06PM

10
#220 - Remus Dalrymple / @bornintheflames

05/05/2017 at 01:27AM

10
#221 - Mike Marion / @mikejmarion

05/09/2017 at 11:55PM

10
#222 - James Houghton / @jamesthoughton

05/19/2017 at 07:45PM

10
#223 - Samuel Damashek / @SamuelDamashek

05/19/2017 at 07:46PM

10
#224 - Chris Robertson / @chrisxrobertson

05/21/2017 at 09:53AM

10
#225 - Melvin Cheung / @MelvinCheung

05/25/2017 at 05:57PM

10
#226 - Karl Hepler / @oldtimeguitar

05/25/2017 at 06:56PM

10
#227 - Tomas Sikula / @tomsmicroblog

05/26/2017 at 06:23PM

10
#228 - Carl Egbert / @CarlOEgbert

06/11/2017 at 08:55PM

10
#229 - David Gustavsson / @mrGustaphe

06/15/2017 at 08:44AM

10
#230 - John Smith / @johns32768

06/17/2017 at 04:21PM

10
#231 - Stop and think / @ms_uncountable

07/08/2017 at 05:14AM

10
#232 - aa / @aassaad93

07/18/2017 at 05:48AM

10
#233 - Frank Malone / @FrankMa00268686

07/27/2017 at 10:28AM

10
#234 - Oskar Fridell / @rax0m

10/09/2017 at 08:11AM

10
#235 - Turkey Man / @lvturkeyman

11/10/2017 at 01:24AM

10
#236 - Benoit Mortgat / @Benoit_Mortgat

11/14/2017 at 02:02PM

10
#237 - Charlie OConor / @charlieoconor

11/14/2017 at 07:09PM

10
#238 - BarbaJol / @drpproteus

01/06/2018 at 12:03PM

10
#239 - Dominic Z / @thammaaa

01/14/2018 at 09:47AM

10
#240 - c0llision / @sh3llcode

01/28/2018 at 10:56AM