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 275 remaining solutions by signing in and submitting your own entry
#276 Michael Potter / MicLeviPotter - Score: 11 - 03/02/16 @ 06:33
<C-V>Gr/ddGddZZ

0 comments


#277 Caleb Roberts / calebmail2012 - Score: 11 - 03/02/16 @ 23:40
<C-V>Gr/ddGddZZ

0 comments


#278 Global Maquereau / GlobalMaquereau - Score: 11 - 03/03/16 @ 16:09
<C-V>Gr/ddGddZZ

0 comments


#279 eL Gee / LauranceEl - Score: 11 - 03/11/16 @ 16:08
<C-V>Gr/ddGddZZ

0 comments


#280 Carlos A Henríquez Q / lagunex - Score: 11 - 03/13/16 @ 17:15
<C-V>Gr/ddLddZZ

0 comments


#281 Filippos K. / filkaris - Score: 11 - 03/18/16 @ 16:24
<C-V>Gr/ddGddZZ

0 comments


#282 Defts = DvToons / defts - Score: 11 - 03/27/16 @ 17:22
<C-V>Gr/dd<C-D>ddZZ

0 comments


#283 Chenut Ludovic / 7Brwa7 - Score: 11 - 04/05/16 @ 11:26
<C-V>Gr/ddGddZZ

0 comments


#284 Clémence / Clemence_Neoxia - Score: 11 - 04/12/16 @ 07:27
<C-V>Gr/ddGddZZ

0 comments


#285 Matteo Signer / MatteoSigner - Score: 11 - 04/12/16 @ 12:47
<C-V>Gr/ddGddZZ

0 comments


#286 John Smith / JohnSmith448816 - Score: 11 - 05/15/16 @ 22:49
<C-V>Gr/ddGddZZ

0 comments


#287 Sanjay / patelsan - Score: 11 - 06/19/16 @ 16:10
<C-V>Gr/ddGddZZ

0 comments


#288 Ram Tamtam / ramtamtamtam - Score: 11 - 06/22/16 @ 13:51
<C-V>Gr/ddGddZZ

0 comments


#289 malet / Malet - Score: 11 - 06/24/16 @ 22:04
<C-V>Gr/ddGddZZ

0 comments


#290 Dan Madden / guthran - Score: 11 - 07/15/16 @ 15:30
<C-V>Gr/ddGddZZ

0 comments


#291 javier castro / eusipial - Score: 11 - 09/17/16 @ 04:31
<C-V>Gr/ddGddZZ

0 comments


#292 Daniel Bellenger / DanielBellenger - Score: 11 - 09/30/16 @ 18:51
<C-V>Gr/ddGddZZ

0 comments


#293 Kyouma / kyoumaJohn - Score: 11 - 10/14/16 @ 15:04
<C-V>Gr/ddGddZZ

0 comments


#294 holy_sin / 0zero0 - Score: 11 - 12/16/16 @ 04:36
<C-V>Gr/ddGddZZ

0 comments


#295 Yann / yannstadnicki - Score: 11 - 02/21/17 @ 05:46
<C-V>Gr/ddGddZZ

0 comments


#296 Daniel / Daniel00288663 - Score: 11 - 03/21/17 @ 10:02
<C-V>Gr/ddGddZZ

0 comments


#297 caplod / caplod - Score: 11 - 03/26/17 @ 09:59
<C-V>Gr/ddGddZZ

0 comments


#298 Alexander Gryson / agryson - Score: 11 - 05/01/17 @ 15:55
<C-V>Gr/dd)ddZZ

0 comments


#299 Wang Wu / rubepeg - Score: 11 - 05/12/17 @ 06:34
<C-V>Gr/ddGddZZ

0 comments


#300 Chicuella / chicuellahere - Score: 11 - 06/06/17 @ 13:28
<C-V>lGr/ddG.ZZ

0 comments


#301 Brandon Height / Lask0x - Score: 11 - 08/08/17 @ 04:00
<C-V>Gr/ddGddZZ

0 comments


#302 Paul Draghicescu / pdragy - Score: 11 - 03/22/18 @ 22:41
<C-V>Gr/ddGddZZ

0 comments


#303 h l / lonnez90 - Score: 12 - 12/08/15 @ 20:33
<C-V>Gc//<Esc>ddG.ZZ

0 comments


#304 macmental / macmental - Score: 12 - 12/18/15 @ 22:13
<C-V>Gr/dd}dd<Esc>ZZ

0 comments


#305 Jakob Schöttl / jschoettl - Score: 12 - 12/31/15 @ 07:54
dd<C-V>G<Left>r/GddZZ

0 comments


#306 wall2flower / wall2flower - Score: 12 - 06/04/16 @ 18:03
<C-V>lGr/ddGddZZ

0 comments


#307 Timothy Caleb Nordlo / tnordloh - Score: 12 - 06/27/16 @ 00:46
dd<C-V>Ghr/GddZZ

0 comments


#308 Ryan van Rensburg / rdvr001 - Score: 12 - 07/18/16 @ 19:29
<C-V>Gs//<Esc>ddG.ZZ

0 comments


#309 Micha / michman89 - Score: 12 - 08/10/16 @ 10:55
<C-V>Gr/ddGdd:x<CR>

0 comments


#310 Hans Yelek / hans_yelek - Score: 12 - 01/11/17 @ 06:03
<C-V>Gc//<Esc>ddG.ZZ

0 comments


#311 Gurukandhamoorthi / Gurukandhamoor1 - Score: 12 - 07/10/17 @ 14:09
ddGdd<C-V>Hhr/ZZ

0 comments


#312 grigouille / grigouille2 - Score: 12 - 07/11/17 @ 11:49
ddG.<C-V>6khr/ZZ

0 comments


#313 Joe Heywood / joehabsjoe - Score: 12 - 12/22/17 @ 18:13
dd<C-V>Ghr/GddZZ

0 comments


#314 Stefan Reinhold / iithron - Score: 13 - 12/14/15 @ 11:38
<C-V>G2r/ddG.:wq<CR>

0 comments


#315 noname / banxjal2 - Score: 13 - 02/06/16 @ 17:44
<C-V>Gc//<Esc>ddGddZZ

0 comments


#316 Oliver Christ / 0liverChrist - Score: 13 - 07/12/16 @ 22:15
<C-V>Gc//<Esc>ddGddZZ

0 comments


#317 杨洋 / 176795444 - Score: 13 - 08/29/17 @ 12:11
ddGdd<C-V>gghr/ZZ

0 comments


#318 Jeff / RealJeffIrwin - Score: 13 - 10/09/17 @ 19:42
ddGdd<C-Q>gghr/ZZ

0 comments


#319 赤佐田奈葉 / akasatanaha_ - Score: 13 - 06/20/18 @ 03:55
ddGdd<C-V>gghr/ZZ

0 comments


#320 Danijel Mitar / DanijelMitar - Score: 14 - 12/13/15 @ 16:49
dd<C-V>G<Left>c//<Esc>GddZZ

0 comments


#321 Ben / CubicPants - Score: 14 - 12/16/15 @ 23:20
dd<C-V>Ghc//<Esc>GddZZ

0 comments


#322 twenty2twoss / twenty2twoss - Score: 14 - 12/28/15 @ 19:24
<C-V>Gr/ddGdd<Esc>:wq<CR>

0 comments


#323 戸田 薫 / KaoruToda - Score: 14 - 01/10/16 @ 04:14
dd<C-V>G0s//<Esc>GddZZ

0 comments


#324 TS / tiredsounds - Score: 14 - 01/27/16 @ 04:28
ddG.<C-V>gghc//<Esc>ZZ

0 comments


#325 Knarf / Knarf93 - Score: 15 - 12/10/15 @ 21:40
dd<C-V>G<Left>c//<Esc>Gdd:x<CR>

0 comments


#326 luffy / raxcoi - Score: 15 - 12/20/15 @ 17:07
ddGdd0<C-V>ggc//<Esc>ZZ

0 comments


#327 (´ ・ω・`) / zenmou - Score: 16 - 01/10/16 @ 07:32
dd:%s#..#//<CR>ddZZ

0 comments


#328 Charles Laber-Smith / clabersmith - Score: 18 - 03/31/16 @ 16:49
ddqq0R//<Esc>jq5@qddZZ

0 comments


#329 Mendel Simon / agentms11 - Score: 19 - 12/08/15 @ 13:17
dd:%s#\W*#// <CR><CR>ddZZ

0 comments


#330 Bence Béky / bence_beky - Score: 19 - 12/11/15 @ 00:04
ddhqaR//<Esc>hjq6@addZZ

0 comments


#331 z0c / zerocabal - Score: 19 - 06/06/18 @ 15:58
ddhqgR//<Esc>hjq5@gddZZ

0 comments


#332 Mike McGowan / mikemcgowan75 - Score: 20 - 12/18/15 @ 14:24
dd0qqr/lr/0jq6@qddZZ

0 comments


#333 Theodore DeRego / tedsta0 - Score: 21 - 12/08/15 @ 08:31
ddhqgR//<Esc>jhq5@gdd:wq<CR>

0 comments


#334 El Achèche ANIS / elacheche - Score: 22 - 12/14/15 @ 17:48
dd:%s/^ \*/\/\//g<CR>ddZZ

0 comments


#335 Matt Walsh / wattmalsh - Score: 22 - 02/13/17 @ 05:25
ddGdd:%s/ \*/\/\//g<CR>ZZ

0 comments


#336 Paul Inc / hiniol1982 - Score: 22 - 08/04/17 @ 18:34
:g/\//<CR>:g//d<CR><C-V>hgghr/ZZ

0 comments


#337 Oser / thegolfer8 - Score: 23 - 01/01/16 @ 01:07
<C-V>GldddGdd<C-V>ggI// <Esc>:w<CR>:q<CR>

0 comments


#338 Alexander Ryzhikov / Coobaha - Score: 27 - 01/05/16 @ 18:18
:%s/*/\/\//g<CR>ddHddggVG<:wq<CR>

0 comments


#339 atemyda-4959 / atemyda - Score: 28 - 12/09/15 @ 10:32
DddGdd<C-V><Left><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up>c//<Esc>ZZ

0 comments


#340 Luke / toy_lang_smell - Score: 29 - 01/01/17 @ 05:37
/*<CR>ddsX<BS><BS>//<Esc>n.n.n.n.n.ndd:wq<CR>

0 comments


#341 Eshan Singh / SinghEshansingh - Score: 31 - 12/22/15 @ 10:46
ddGddgghqqr/jq<C-V>6j@qggl<C-V>6j@@:wq<CR>

0 comments


#342 Lucas McDaniel / Ldmcdaniel109 - Score: 32 - 01/21/16 @ 21:36
ddh2ciw//<Esc>jh.jh.jh.jh.jh.jdd:wq<CR>

0 comments


#343 Christopher Wells / ExcaliburZero_Z - Score: 54 - 12/11/15 @ 12:05
dd<Del><Del><Down><Del><Del><Down><Del><Del><Down><Del><Del><Down><Del><Del><Down><Del><Del><Down>ddi<Left>//<Up><Left><Left>//<Up><Left><Left>//<Up><Left><Left>//<Up><Left><Left>//<Up><Left><Left>//<Esc>ZZ

0 comments


#344 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

344 active golfers, 780 entries

Leaderboard (lowest score wins):
10
#181 - Arijus / argshook

06/16/2016 at 01:05PM

10
#182 - TaoChen / 632143592Tao

06/17/2016 at 07:53AM

10
#183 - Ameen P / Ameen_P1

06/18/2016 at 11:34PM

10
#184 - Vaisian / Vaisian

07/06/2016 at 05:42PM

10
#185 - tgmeng / lazy_fabric

07/11/2016 at 11:24AM

10
#186 - 王运 / 640138017

07/18/2016 at 05:49AM

10
#187 - André Peric Tavares / AndrePeric

07/20/2016 at 11:15PM

10
#188 - Alonzo / tolver_a

07/22/2016 at 10:54PM

10
#189 - Jeremiah Goyette / JeremiahGoyette

08/01/2016 at 03:00AM

10
#190 - George Angelopoulos / g_usermod

08/05/2016 at 08:56AM

10
#191 - Herbert S. / herbertshlong

08/05/2016 at 10:59PM

10
#192 - Will / obiwan__k3n00bi

08/14/2016 at 10:23PM

10
#193 - Antoni Villalonga / friki

08/15/2016 at 05:49PM

10
#194 - Martin Tõnusoo / martintonusoo

08/27/2016 at 08:39PM

10
#195 - jdupont655 / jdupont655

09/02/2016 at 01:25AM

10
#196 - Stephen Aument / saument

09/02/2016 at 06:19PM

10
#197 - Utkrisht Dhankar / UtkrishtDhankar

09/08/2016 at 05:09AM

10
#198 - hor1ace / hor3ace

09/08/2016 at 08:24AM

10
#199 - loki2441 / loki2441

09/10/2016 at 05:30AM

10
#200 - Constantine / ConstantineHatz

09/20/2016 at 10:51PM

10
#201 - Nico / _Nico_Caro

09/27/2016 at 04:23PM

10
#202 - Netrisk Cool / C00lt0

10/01/2016 at 09:47AM

10
#203 - TweetDreams / TweetMusicians

10/08/2016 at 11:57PM

10
#204 - trx / trxdbg

10/11/2016 at 10:19AM

10
#205 - Christian Rondeau / c_rondeau

10/17/2016 at 11:51AM

10
#206 - Bill Ruddock / biinari

10/25/2016 at 01:38PM

10
#207 - John Barbero Unenge / JBarberU

11/18/2016 at 01:33PM

10
#208 - Etienne Florent / EtienneFlorent

11/23/2016 at 04:35PM

10
#209 - Jon Louie / jjisnow

11/24/2016 at 03:00AM

10
#210 - Wessel Sinnema / wsinnema

11/27/2016 at 04:59PM