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
#61 - tzvika ofek / tzvio

12/21/2015 at 02:25PM

10
#62 - Lord Phantom / lord_phantom_pl

12/22/2015 at 12:53AM

10
#63 - Ravil Bayramgalin / brainopia

12/22/2015 at 01:33AM

10
#64 - Marcelo Montu / _mMontu_

12/22/2015 at 03:52PM

10
#65 - Fabi / zehdeh90

12/22/2015 at 10:18PM

10
#66 - Sebastian Nickel / tumblingwhimsy

12/23/2015 at 03:15AM

10
#67 - Elrrrrrrr / Elrrrrrrr

12/23/2015 at 09:26AM

10
#68 - Aris Kotzias / ArisKotzias

12/23/2015 at 10:38AM

10
#69 - Mikael Axelsson / Mikael_Axelsson

12/23/2015 at 12:32PM

10
#70 - Ethan Stewart / EthanS279

12/23/2015 at 08:49PM

10
#71 - Sam Stites / SamStites

12/25/2015 at 05:18AM

10
#72 - Oleg Alfalfa / 6alfalfa9

12/25/2015 at 12:37PM

10
#73 - Framecurrent / framecurrent

12/25/2015 at 08:07PM

10
#74 - aanton / aanton

12/25/2015 at 08:34PM

10
#75 - Adv_Zxy / adv_zxy

12/26/2015 at 09:21AM

10
#76 - Egg / hammingdistanc1

12/26/2015 at 04:15PM

10
#77 - Håken Lid / haakenlid

12/26/2015 at 11:40PM

10
#78 - Marko / suchtie

12/27/2015 at 07:45PM

10
#79 - Maciej Woźniak / eldhash

12/27/2015 at 11:27PM

10
#80 - Brian C Sparks / briancsparks

12/28/2015 at 01:20PM

10
#81 - Gordon / gordonczedik

12/28/2015 at 06:02PM

10
#82 - Lucien Baron / Luci1B

12/28/2015 at 10:03PM

10
#83 - Raj / brshenoy

12/29/2015 at 08:19PM

10
#84 - Evan Coleman / edc1591

12/29/2015 at 08:19PM

10
#85 - Benny Wong / bdotdub

12/29/2015 at 08:34PM

10
#86 - Michael / Michael57309129

12/30/2015 at 06:53AM

10
#87 - Matthieu Crapet / mcr05

12/31/2015 at 06:33AM

10
#88 - Krzysztof Słonka / KrzysztofSlonka

12/31/2015 at 10:16AM

10
#89 - John Lee / NSA_agent_209

12/31/2015 at 10:18AM

10
#90 - Anthony BERNARD / TweetTontony

12/31/2015 at 05:01PM