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 59384eb3652ee111a0000001

From argument to object

This task typifies those programmers endure while coding. This C-family pseudocode needs a function argument to be repurposed as an object call. Simply search and replace? Repeat a pattern of edits?

Start file
organize(cupboard, 3, 2);
prioritize(bureau, 8, 7);
realize(bannister, 4, 4);
moralize(railing, 3,9);
End file
cupboard.organize(3, 2);
bureau.prioritize(8, 7);
bannister.realize(4, 4);
railing.moralize(3,9);

View Diff

1,4c1,4
< organize(cupboard, 3, 2);
< prioritize(bureau, 8, 7);
< realize(bannister, 4, 4);
< moralize(railing, 3,9);
---
> cupboard.organize(3, 2);
> bureau.prioritize(8, 7);
> bannister.realize(4, 4);
> railing.moralize(3,9);

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 116 remaining solutions by signing in and submitting your own entry
#117 Andrei Gasparovici / AGasparovici - Score: 21 - 07/06/17 @ 16:07
qmdf(ea.<Esc>pl2xj0q3@mZZ

0 comments

#118 flykule / flykule - Score: 21 - 07/09/17 @ 09:01
qqd2wwplxF,r.0jq3@qZZ

0 comments

#119 Christian Panadero / PaNaVTEC - Score: 21 - 07/11/17 @ 21:23
qqd2wwplxF,r.0jq3@qZZ

0 comments

#120 FunkySayu / FunkySayu - Score: 21 - 07/17/17 @ 21:18
qqdf(wi.<Esc>pldw0jq3@qZZ

0 comments

#121 Ildar Gilfanov / Ildar_Razin - Score: 21 - 07/22/17 @ 05:53
qqdf(ea.<Esc>pl2xj0q3@qZZ

0 comments

#122 joshuathurston1 / joshuathurston1 - Score: 22 - 06/07/17 @ 23:10
qdwwyw"_dW0Pa.<Esc>+q3@dZZ

0 comments

#123 Tallak Tveide / tallakt - Score: 22 - 06/20/17 @ 07:30
qqwwywdf I<C-R>0.<Esc>j0q3@qZZ

0 comments

#124 Mayank Suman / mayank_suman - Score: 22 - 06/24/17 @ 15:29
qqf(ldf 0Phxr.0jq3@qZZ

0 comments

#125 grigouille / grigouille2 - Score: 22 - 06/25/17 @ 19:47
qadwEplr(F,r.0xjq4@aZZ

0 comments

#126 Ben Hill / KaizenSoze70 - Score: 22 - 06/29/17 @ 11:59
qaf,"adb2xI<C-R>a.<Esc>jq3@aZZ

0 comments

#127 Ara Hacopian / ahacop - Score: 23 - 06/07/17 @ 20:58
qq0df(f,i.<C-R>"<Esc>exxjq3@qZZ

0 comments

#128 Ayman Farhat / aymanfarhat - Score: 23 - 06/09/17 @ 09:25
qawwvf d0Pwi<BS><BS>.<Esc>+q3@aZZ

0 comments

#129 Patrick Sanan / patricksanan - Score: 23 - 06/13/17 @ 13:48
qqf(ldf 0Ph2s.<Esc>j0q3@qZZ

0 comments

#130 samullman / samullman - Score: 23 - 06/20/17 @ 07:07
qcf xdT(0Pr.j0@cq@c:wq<CR>

0 comments

#131 Stop and think / ms_uncountable - Score: 23 - 07/07/17 @ 14:51
qawwdw0i.<Esc>Pf,xxj0q3@aZZ

0 comments

#132 Adam Bozanich / abozanich - Score: 24 - 06/08/17 @ 01:24
qq0"adwxwc2l.<C-R>a(<Esc>jq3@qZZ

0 comments

#133 Meriadec Pillet / loomisBroom - Score: 24 - 06/18/17 @ 17:03
qaf(ldf ^Pvhs.<C-C><C-C>^jq3@aZZ

0 comments

#134 lpag / lpag_ai - Score: 24 - 06/25/17 @ 22:03
qq0wwdaw0Pa.<Esc>f,2xjq3@qZZ

0 comments

#135 korneev alexey / kornei4 - Score: 25 - 06/08/17 @ 08:40
qa2wvwld0Ph2r.xj0q3@a:wq<CR>

0 comments

#136 Arch Menzies / ArchMenzies - Score: 26 - 06/14/17 @ 15:47
qqd2wea.<Esc>plxxj0q@q@q@q:wq<CR>

0 comments

#137 chamow / sbakeugs - Score: 28 - 06/22/17 @ 07:41
qaf vT(x0Pjq3@a:%s/,\s/./<CR>ZZ

0 comments

#138 Tom Taylor / larsonsduck - Score: 28 - 07/14/17 @ 14:39
qqf(ldiw^Pa.<Esc>f,xx^jq@q@@@@ZZ

0 comments

#139 Jye Sawtell-Rickson / jsawtellrickson - Score: 31 - 06/18/17 @ 08:39
qqveldea.<Esc>plvld<Esc>qj0@qj0@qj0@qZZ

0 comments

#140 Daniel Casadevall / DCasadevallPino - Score: 32 - 06/13/17 @ 23:54
qxf(ldf ^Pxhr.^jq@@<Esc>@x@@@@:w<CR>:q<CR>

0 comments

#141 Anoop Kumar / anooplive - Score: 33 - 06/09/17 @ 18:20
:%s/\(.*\)(\(.\{-}\), /\2.\1(/<CR>ZZ

0 comments

#142 toddagibson / toddagibson - Score: 38 - 06/07/17 @ 19:08
:% s/^\([^(]*\)(\([^,]*\), /\2.\1(/<CR>ZZ

0 comments

#143 Richard_ / richardwlaub - Score: 54 - 06/15/17 @ 19:02
fcdw0Pa.<Esc>f,2xj2bdw0Pa.<Esc>;2xj2bdw0Pa.<Esc>;2xj2bdw0Pa.<Esc>;2xZZ

0 comments

#144 Steven Oxley / xonev - Score: 80 - 06/09/17 @ 05:24
:%s/\(.*\)(\([8<BS>`<BS>?<BS>^,]\), /\1<BS>2.\(<BS>1(\g<CR>:<Up><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Left><Right>*<CR>u:<Up><BS><BS>\<BS>@<BS><BS>{<BS>(/g<CR>:wq<CR>

0 comments

#145 William Dankspeare / will_dankspeare - Score: 81 - 06/29/17 @ 17:31
c2w<Esc>ux2w<Esc>uwwdwxx0P<Esc>uuuu0d2w<Esc>uww10x0Pvhc.<Esc><Esc>jww8x0Pvhc.<Esc>jww11x0Pvhc.<Esc>j9x0Pvhc.<Esc>:wq<CR>

0 comments

Created by: toddagibson

145 active golfers, 450 entries

Leaderboard (lowest score wins):
17
#1 - Urtica dioica / udioica

06/07/2017 at 08:05PM

17
#2 - Smylers / Smylers2

06/07/2017 at 09:17PM

17
#3 - tPenguinLTG / tpenguinltg

06/07/2017 at 11:36PM

17
#4 - 梧桐王子 / WutongYujie

06/08/2017 at 01:18AM

17
#5 - John Braxler / braxler

06/08/2017 at 11:58AM

17
#6 - Song Zheng / songz

06/08/2017 at 05:52PM

17
#7 - Julian / jufahr

06/08/2017 at 08:47PM

17
#8 - David Gustavsson / mrGustaphe

06/09/2017 at 11:36AM

17
#9 - Saki Gw / Sakigw

06/09/2017 at 03:30PM

17
#10 - Benjamin Hiltpolt / vbenni

06/11/2017 at 01:48PM

17
#11 - Swan Benoit / Rwangum

06/12/2017 at 08:25AM

17
#12 - Michael Buckley / apolatg

06/13/2017 at 09:07PM

17
#13 - Maricris Bonzo / seemcat

06/15/2017 at 01:10AM

17
#14 - Robert Mosher / rcmosher

06/15/2017 at 04:01PM

17
#15 - Super VedoVatto / supervedovatto

06/15/2017 at 11:44PM

17
#16 - Артем Верхоглядов / artditel

06/16/2017 at 09:57AM

17
#17 - Blake Tereau / BlakeTereau

06/16/2017 at 01:30PM

17
#18 - Sebastián ArteStyle / EtraStyle

06/17/2017 at 03:52AM

17
#19 - Maximilian Albert / cilix42

06/17/2017 at 11:59AM

17
#20 - Joel Meyer-Hamme / JoelMeyerHamme

06/18/2017 at 03:23PM

17
#21 - Kawin Nikomborirak / KNikomborirak

06/19/2017 at 06:05AM

17
#22 - David / Revan4Vendetta

06/20/2017 at 06:35AM

17
#23 - Christian Stammen / c0smiq

06/21/2017 at 08:18AM

17
#24 - Johan Kristiansson / johankri

06/21/2017 at 11:27AM

17
#25 - Eduardo Hashimoto / eduhashi

06/21/2017 at 01:54PM

17
#26 - Andre Cato / DreBear800

06/21/2017 at 07:06PM

17
#27 - Nick Bakkegaard / Bakkemand

06/22/2017 at 04:12PM

17
#28 - .... / coffman_r

06/22/2017 at 09:40PM

17
#29 - Petro Тrouq / zulolosi

06/23/2017 at 05:11AM

17
#30 - Eva Bojorges / eeveeta

06/23/2017 at 08:04PM

17
#31 - akanb / GAkt6L6SlKhy8zA

06/28/2017 at 03:36AM

17
#32 - Bennett Bernardoni / BBernardoni

06/28/2017 at 03:54PM

17
#33 - Kieron Browne / KieronBrowne1

06/29/2017 at 04:26PM

17
#34 - 杨洋 / 176795444

06/30/2017 at 12:28PM

17
#35 - James Thomas / skipskipskipped

07/02/2017 at 12:30AM

17
#36 - Adrian Englhardt / _englhardt

07/07/2017 at 09:14AM

17
#37 - Михаил Добров / mSuGfwFz2ZNvv5b

07/08/2017 at 01:58PM

17
#38 - Jon Barker / j0nbarker

07/12/2017 at 10:36AM

17
#39 - Amalie Stokholm / amalie_stokholm

07/15/2017 at 07:30AM

17
#40 - Gabriel Siqueira / Gabriel_HSiq

07/20/2017 at 11:55AM

17
#41 - huho / huho_xu

07/25/2017 at 07:08PM

18
#42 - Kai Yuan / kentyuan

06/07/2017 at 07:54PM

18
#43 - Cristian / cris_perez_b

06/07/2017 at 09:37PM

18
#44 - James / Dronak

06/07/2017 at 10:26PM

18
#45 - Tony Pajamas / trash_pajamas

06/08/2017 at 04:51AM

18
#46 - klaxalk / klaxalk

06/08/2017 at 07:25AM

18
#47 - Jan Bundesmann / ixjab

06/08/2017 at 08:55AM

18
#48 - Victor Ramirez / virako

06/08/2017 at 08:56AM

18
#49 - Daniel Hjelm / dhjelm

06/08/2017 at 05:36PM

18
#50 - Brian Hall / _bruab_

06/09/2017 at 02:54PM

18
#51 - Nimrod / n1mr0d

06/10/2017 at 02:39PM

18
#52 - Daren Hayward / DarenHayward

06/11/2017 at 09:16AM

18
#53 - James Bernsen / jamesbernsen

06/11/2017 at 03:52PM

18
#54 - Lifepillar / lifepillar

06/11/2017 at 08:23PM

18
#55 - やま / K6rzv7URxtE6CFy

06/12/2017 at 11:29AM

18
#56 - kkh / kkhdlut

06/14/2017 at 02:56PM

18
#57 - Emmanuel Herrero / hairarrow

06/14/2017 at 07:00PM

18
#58 - John Smith / john828495

06/16/2017 at 12:59PM

18
#59 - John Smith / johns32768

06/16/2017 at 06:43PM

18
#60 - squdle / squdle

06/16/2017 at 06:57PM

18
#61 - Tom Sisk / TomSisk

06/17/2017 at 03:48AM

18
#62 - Benoit Bou / 3enoit3

06/17/2017 at 10:02AM

18
#63 - moritz / moritz45081535

06/18/2017 at 12:58PM

18
#64 - Jonathan Eidsness / jonathaneidsnes

06/21/2017 at 03:55AM

18
#65 - vimgolfer864 / vimgolfer864

06/21/2017 at 04:33PM

18
#66 - Julian Felix / h4wked

06/22/2017 at 01:06PM

18
#67 - Ryan McNamara / MadDogMcNamara

06/23/2017 at 04:15AM

18
#68 - J / J02108006

06/24/2017 at 08:18PM

18
#69 - Tomasz Walotek / uolot

06/26/2017 at 04:11PM

18
#70 - vimgolf player / VimgolfPlayer

06/26/2017 at 11:16PM

18
#71 - Gracjan Grala / gracjangrala

06/27/2017 at 12:32AM

18
#72 - io / iovis9

07/03/2017 at 10:20PM

18
#73 - Dick Quixly / DickQuixly

07/05/2017 at 01:40AM

18
#74 - Jacob Buete / JBuete

07/07/2017 at 02:45AM

18
#75 - Dan Simmons / simmons_dan

07/11/2017 at 04:46PM

18
#76 - Matthew Broatch / mnbroatch

07/11/2017 at 05:40PM

18
#77 - blamitter / blamitter

07/20/2017 at 04:17PM

18
#78 - Etienne Dilocker / etiennedi

07/20/2017 at 08:23PM

18
#79 - Hu Ho Xu / huhoxu

07/25/2017 at 06:35PM

19
#80 - Joseph Barratt / josuf107

06/07/2017 at 07:39PM

19
#81 - AleksandarTrifunovic / akstrfn

06/07/2017 at 08:26PM

19
#82 - EQMac MGBs / EQMacMGBs

06/07/2017 at 09:37PM

19
#83 - シカ / pigaccel

06/08/2017 at 07:20AM

19
#84 - Андрей / andreyrmg

06/08/2017 at 08:01AM

19
#85 - Colby Hamilton / ColbyHamilton5

06/09/2017 at 07:40PM

19
#86 - Sebastian Korten / FlashKorten

06/10/2017 at 11:37AM

19
#87 - Scott Mills / smm1729

06/11/2017 at 03:24AM

19
#88 - Миша Сорокин / rafmikovi4

06/15/2017 at 01:19PM

19
#89 - Chris Clement / Null_is_Null

06/16/2017 at 07:42PM

19
#90 - Ian Isaac Emnace / 29forte95

06/19/2017 at 01:08PM

19
#91 - Michael Rees / reesmichael1

06/22/2017 at 11:03PM

19
#92 - Brendan G / Brendan314

06/27/2017 at 06:42PM

19
#93 - Anne Pacalet / _Anne_P

07/07/2017 at 02:41PM

19
#94 - Rowan Tree / RowanTr88447528

07/21/2017 at 07:53AM

19
#95 - Vedro / Vedro03557622

07/27/2017 at 09:26PM

20
#96 - MS / schrectacular

06/07/2017 at 07:38PM

20
#97 - Daniel K. / lan4k

06/07/2017 at 09:08PM

20
#98 - Carl Egbert / CarlOEgbert

06/09/2017 at 05:04AM

20
#99 - jack / jack28887741

06/09/2017 at 08:30AM

20
#100 - Sergey Lisakov / pozitron57

06/09/2017 at 01:59PM

20
#101 - Jon Doe / JonDoe33157611

06/13/2017 at 06:42AM

20
#102 - Daniel Smith / _Tysonzero

06/20/2017 at 05:05PM

20
#103 - el pollo diablo / bjagojevich

06/21/2017 at 07:22PM

20
#104 - Cody Heimberger / certifiedloud

07/08/2017 at 04:59AM

20
#105 - Gurukandhamoorthi / Gurukandhamoor1

07/09/2017 at 12:32PM

20
#106 - 黒澤亮二 / rjkuro

07/18/2017 at 02:52PM

21
#107 - sebastian pech / specht08

06/08/2017 at 10:45AM

21
#108 - Basile Perrenoud / BP_DK_

06/08/2017 at 12:13PM

21
#109 - Ryan Coopersmith / RyanCoopersmit1

06/10/2017 at 01:03AM

21
#110 - Will Gunther / WillGunther

06/11/2017 at 06:32PM

21
#111 - j00b00 / j00b00

06/13/2017 at 11:08PM

21
#112 - Thomas / thomasauros

06/14/2017 at 10:27PM

21
#113 - Daniel Oosthuizen / daan7jie

06/20/2017 at 11:29AM

21
#114 - Derek Schrock / derekschrock

06/23/2017 at 12:30AM

21
#115 - Ivan Poroliev / p0pac

07/02/2017 at 04:05PM

21
#116 - Yann Vanhalewyn / yannvanhalewyn

07/06/2017 at 02:54AM

21
#117 - Andrei Gasparovici / AGasparovici

07/06/2017 at 04:07PM

21
#118 - flykule / flykule

07/09/2017 at 09:01AM

21
#119 - Christian Panadero / PaNaVTEC

07/11/2017 at 09:23PM

21
#120 - FunkySayu / FunkySayu

07/17/2017 at 09:18PM

21
#121 - Ildar Gilfanov / Ildar_Razin

07/22/2017 at 05:53AM

22
#122 - joshuathurston1 / joshuathurston1

06/07/2017 at 11:10PM

22
#123 - Tallak Tveide / tallakt

06/20/2017 at 07:30AM

22
#124 - Mayank Suman / mayank_suman

06/24/2017 at 03:29PM

22
#125 - grigouille / grigouille2

06/25/2017 at 07:47PM

22
#126 - Ben Hill / KaizenSoze70

06/29/2017 at 11:59AM

23
#127 - Ara Hacopian / ahacop

06/07/2017 at 08:58PM

23
#128 - Ayman Farhat / aymanfarhat

06/09/2017 at 09:25AM

23
#129 - Patrick Sanan / patricksanan

06/13/2017 at 01:48PM

23
#130 - samullman / samullman

06/20/2017 at 07:07AM

23
#131 - Stop and think / ms_uncountable

07/07/2017 at 02:51PM

24
#132 - Adam Bozanich / abozanich

06/08/2017 at 01:24AM

24
#133 - Meriadec Pillet / loomisBroom

06/18/2017 at 05:03PM

24
#134 - lpag / lpag_ai

06/25/2017 at 10:03PM

25
#135 - korneev alexey / kornei4

06/08/2017 at 08:40AM

26
#136 - Arch Menzies / ArchMenzies

06/14/2017 at 03:47PM

28
#137 - chamow / sbakeugs

06/22/2017 at 07:41AM

28
#138 - Tom Taylor / larsonsduck

07/14/2017 at 02:39PM

31
#139 - Jye Sawtell-Rickson / jsawtellrickson

06/18/2017 at 08:39AM

32
#140 - Daniel Casadevall / DCasadevallPino

06/13/2017 at 11:54PM

33
#141 - Anoop Kumar / anooplive

06/09/2017 at 06:20PM

38
#142 - toddagibson / toddagibson

06/07/2017 at 07:08PM

54
#143 - Richard_ / richardwlaub

06/15/2017 at 07:02PM

80
#144 - Steven Oxley / xonev

06/09/2017 at 05:24AM

81
#145 - William Dankspeare / will_dankspeare

06/29/2017 at 05:31PM