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):
11
#271 - Jaron Hamlik / jdhamlik

02/27/2016 at 03:28AM

11
#272 - fzort / fzort

02/28/2016 at 02:54PM

11
#273 - Zach Gulde / zgulde

02/29/2016 at 05:02AM

11
#274 - Pratap Koritala / pratap_koritala

02/29/2016 at 07:05AM

11
#275 - antew / antewcode

02/29/2016 at 07:08PM

11
#276 - Michael Potter / MicLeviPotter

03/02/2016 at 06:33AM

11
#277 - Caleb Roberts / calebmail2012

03/02/2016 at 11:40PM

11
#278 - Global Maquereau / GlobalMaquereau

03/03/2016 at 04:09PM

11
#279 - eL Gee / LauranceEl

03/11/2016 at 04:08PM

11
#280 - Carlos A Henríquez Q / lagunex

03/13/2016 at 05:15PM

11
#281 - Filippos K. / filkaris

03/18/2016 at 04:24PM

11
#282 - Defts = DvToons / defts

03/27/2016 at 05:22PM

11
#283 - Chenut Ludovic / 7Brwa7

04/05/2016 at 11:26AM

11
#284 - Clémence / Clemence_Neoxia

04/12/2016 at 07:27AM

11
#285 - Matteo Signer / MatteoSigner

04/12/2016 at 12:47PM

11
#286 - John Smith / JohnSmith448816

05/15/2016 at 10:49PM

11
#287 - Sanjay / patelsan

06/19/2016 at 04:10PM

11
#288 - Ram Tamtam / ramtamtamtam

06/22/2016 at 01:51PM

11
#289 - malet / Malet

06/24/2016 at 10:04PM

11
#290 - Dan Madden / guthran

07/15/2016 at 03:30PM

11
#291 - javier castro / eusipial

09/17/2016 at 04:31AM

11
#292 - Daniel Bellenger / DanielBellenger

09/30/2016 at 06:51PM

11
#293 - Kyouma / kyoumaJohn

10/14/2016 at 03:04PM

11
#294 - holy_sin / 0zero0

12/16/2016 at 04:36AM

11
#295 - Yann / yannstadnicki

02/21/2017 at 05:46AM

11
#296 - Daniel / Daniel00288663

03/21/2017 at 10:02AM

11
#297 - caplod / caplod

03/26/2017 at 09:59AM

11
#298 - Alexander Gryson / agryson

05/01/2017 at 03:55PM

11
#299 - Wang Wu / rubepeg

05/12/2017 at 06:34AM

11
#300 - Chicuella / chicuellahere

06/06/2017 at 01:28PM