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
#121 - Durga Swaroop Perla / durgaswaroop

02/03/2016 at 12:31PM

10
#122 - Gerald Tilma / GeraldTilma

02/04/2016 at 01:40AM

10
#123 - Thijs van den Anker / thijsvdanker

02/05/2016 at 01:57PM

10
#124 - James Burns / James_Ian_Burns

02/12/2016 at 02:41AM

10
#125 - walter sullivan / walters82208305

02/12/2016 at 03:23PM

10
#126 - Michael Buckley / apolatg

02/13/2016 at 06:39PM

10
#127 - Mathias Andersson / Wraul

02/13/2016 at 07:09PM

10
#128 - John Smith / literacyisgood

02/19/2016 at 11:51PM

10
#129 - Roland Hougs / OminousWater

02/21/2016 at 05:14PM

10
#130 - royer / RoyerMoyer1

02/23/2016 at 10:10AM

10
#131 - Antony Garand / Anyny00

02/25/2016 at 01:06AM

10
#132 - Xiaocan Li / XiaocanLi

02/26/2016 at 10:35PM

10
#133 - ɹǝsnɐɥsıʇnɹ uoɾ / JonRutis

02/29/2016 at 07:03PM

10
#134 - Benjamin Miller / Bmiller14Miller

02/29/2016 at 07:27PM

10
#135 - Mark Saiget / MarkSaiget

03/01/2016 at 06:36AM

10
#136 - Rubén Chavarría T. / rchavarriat

03/02/2016 at 07:59AM

10
#137 - Michel Ganguin / tinycrazyfish

03/02/2016 at 10:34AM

10
#138 - ค×ɛเ / pwnedary

03/02/2016 at 04:35PM

10
#139 - hardaudit / hardaudit

03/04/2016 at 10:25AM

10
#140 - glepha / glepha_vim

03/06/2016 at 11:29PM

10
#141 - Dimitar Dimitrov / kurkale6ka

03/08/2016 at 03:49PM

10
#142 - Piotr Madaliński / MadalinskiPiotr

03/08/2016 at 06:27PM

10
#143 - Hao Chen / Chen_Hao

03/09/2016 at 04:21PM

10
#144 - Andreas Carben / meiner_eins

03/13/2016 at 04:47PM

10
#145 - Codecor / codecor02

03/13/2016 at 07:31PM

10
#146 - Yahyalexandre33 / yahyalexandre33

03/15/2016 at 01:41AM

10
#147 - Janko Jerinic / JankoJerinic

03/27/2016 at 02:19AM

10
#148 - Yanis KHORSI / YanisKHORSI

03/28/2016 at 09:20AM

10
#149 - Dinesh Bhosale / MrDineshBhosale

03/28/2016 at 05:54PM

10
#150 - Jason Choi / joyous_jason

03/29/2016 at 08:27AM