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 219 remaining solutions by signing in and submitting your own entry
#220 Ildar Gilfanov / Ildar_Razin - Score: 21 - 07/22/17 @ 05:53
qqdf(ea.<Esc>pl2xj0q3@qZZ

0 comments


#221 Anton Outkine / AOutkine - Score: 21 - 08/07/17 @ 02:21
qqdf(wplxF,r.j0q3@qZZ

0 comments


#222 Brandon Height / Lask0x - Score: 21 - 08/08/17 @ 01:08
qad2wwplxF,r.0jq3@aZZ

0 comments


#223 Cheer / yougec - Score: 21 - 08/11/17 @ 02:49
qqdf(ea.<Esc>pl2xj0q3@qZZ

0 comments


#224 Alejandro Catalina / AleexCatalina - Score: 21 - 09/13/17 @ 18:17
qqdf(ea.<Esc>plxxj0q3@qZZ

0 comments


#225 James Houghton / jamesthoughton - Score: 21 - 09/16/17 @ 21:21
qqf,2xdT(^Pa.<Esc>jq3@qZZ

0 comments


#226 jirgn / jirgn - Score: 21 - 09/17/17 @ 19:30
qqf,2dldb0Pa.<Esc>jq3@qZZ

0 comments


#227 Joe Reddington / joereddington - Score: 21 - 11/14/17 @ 11:59
qqd2wwplxF,r.0jq3@qZZ

0 comments


#228 h43z / h43z - Score: 21 - 01/04/18 @ 15:14
qad2wwplxF,r.0jq3@aZZ

0 comments


#229 c0llision / 0xc0llision - Score: 21 - 01/26/18 @ 10:41
qqdf(ea.<Esc>pl2xj0q3@qZZ

0 comments


#230 phucvin / phucvin - Score: 21 - 02/14/18 @ 16:30
qadf(wi.<Esc>pl2xj0q3@aZZ

0 comments


#231 서강훈 / shirano150 - Score: 21 - 04/03/18 @ 07:53
qqdf(wi.<Esc>pldw0jq3@qZZ

0 comments


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

0 comments


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

0 comments


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

0 comments


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

0 comments


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

0 comments


#237 Benjamin Unger / Ben_Unger - Score: 22 - 08/16/17 @ 19:35
qqd2wf,plxF,r.0jq3@qZZ

0 comments


#238 Cyrus Nikolaidis / CyrusNikolaidis - Score: 22 - 08/21/17 @ 01:39
qqf(ldf 0Px<Left>r.0<Down>q3@qZZ

0 comments


#239 ryuugekisya / ryuugekisya - Score: 22 - 11/04/17 @ 10:16
qadf(f pF,c2l.<Esc>+q3@aZZ

0 comments


#240 George Angelopoulos / g_usermod - Score: 22 - 11/21/17 @ 09:43
qqf(ldW0Ph2s.<Esc>j0q3@qZZ

0 comments


#241 cds / cdsudama - Score: 22 - 04/12/18 @ 02:38
qqWdb.0i.<Esc>P<CR>q3@q:ZZ<CR>ZZ

0 comments


#242 nomsayin / nomsayin - Score: 22 - 04/16/18 @ 03:25
qqf ldT(^PXs.<Esc>j^q3@qZZ

0 comments


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

0 comments


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

0 comments


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

0 comments


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

0 comments


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

0 comments


#248 Brony PlusOne / BronyPlusOne - Score: 23 - 08/04/17 @ 23:29
qqdwf,plr(F,r.0xjq7@qZZ

0 comments


#249 Daniel / 0x9ABC - Score: 23 - 08/14/17 @ 20:02
qqdf(:s/, /.<C-R>"/<CR>jq3@qZZ

0 comments


#250 Daniel de Vries / devries_d - Score: 23 - 02/12/18 @ 15:55
qq2wdWI<C-R>"<Esc>xhr.j0@qq@qZZ

0 comments


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

0 comments


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

0 comments


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

0 comments


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

0 comments


#255 Sébastien Canart / kokotchY - Score: 25 - 10/28/17 @ 09:10
qqf,"adT(2x0"aPa.<Esc>jq3@qZZ

0 comments


#256 Dmitry Ilyin / widgetii - Score: 25 - 05/05/18 @ 20:05
qaf(ldf BPxhr.^jq@a@a@aZZ

0 comments


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

0 comments


#258 Damien BRY ⚡️ / orbmancer - Score: 26 - 10/10/17 @ 08:38
qqi.<Esc>f(<Right>vedi<Del><Del><Esc>0P0<Down>q3@q:x<CR>

0 comments


#259 Tim Varley / varleti - Score: 26 - 11/08/17 @ 20:50
qa2wv2whx0Pxhr.hj0q3@a:wq<CR>

0 comments


#260 Nikola Dodik / dodiknikola - Score: 27 - 11/14/17 @ 16:46
qqf(ld2w0Ps<BS>.<Esc>j0q@q@@@@:wq<CR>

0 comments


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

0 comments


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

0 comments


#263 Eric Ahlberg / e_ahlberg - Score: 28 - 11/23/17 @ 20:26
qqf(lvellx0Pxhr.0jq@q2@q:wq<CR>

0 comments


#264 Sebastian / echsberde - Score: 30 - 08/20/17 @ 21:53
qqdt(udf(wR.P<BS><Esc>plxj0q@q2@q@qZZ

0 comments


#265 Jeff / RealJeffIrwin - Score: 30 - 09/28/17 @ 20:01
qqi.<Esc>wwwdw0P/\d<CR>hhxxj0q3@q:wq<CR>

0 comments


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

0 comments


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

0 comments


#268 Stuart Freeman / seriouslyuguys - Score: 32 - 08/23/17 @ 18:14
:%s/\(\w*\)(\(\w*\), /\2.\1(/<CR>ZZ

0 comments


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

0 comments


#270 Ryan Tran / BlueAccords - Score: 33 - 10/19/17 @ 20:01
:%s/\(.*\)(\(.\{-}\), /\2.\1(/<CR>ZZ

0 comments


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

0 comments


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

0 comments


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


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

274 active golfers, 842 entries

Leaderboard (lowest score wins):
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

17
#42 - devoh / devvohh

07/28/2017 at 07:14PM

17
#43 - Will / obiwan__k3n00bi

08/03/2017 at 03:15AM

17
#44 - Ky Statham / ijustwannacode

08/10/2017 at 06:28PM

17
#45 - Floris van Liere / FlorisvanLiere

08/15/2017 at 08:03PM

17
#46 - Terry Ding / TerryDing77

08/23/2017 at 03:44PM

17
#47 - Mathias Dahlhaus / mgdahlhaus

08/26/2017 at 12:21PM

17
#48 - magicmonty / magicmonty

08/26/2017 at 07:19PM

17
#49 - Darren Weston / dazWestonUK

08/29/2017 at 08:10PM

17
#50 - zava / znl1087

09/04/2017 at 05:06AM

17
#51 - bazkila@gmail.com / bazkila

09/05/2017 at 01:58AM

17
#52 - aselaIllayaparachchi / asela38

09/11/2017 at 03:54AM

17
#53 - Karamfil / lz1aai

09/24/2017 at 11:30PM

17
#54 - exsaber / exsaber508

09/25/2017 at 05:00AM

17
#55 - F / gofilby

09/26/2017 at 08:35PM

17
#56 - Charlie OConor / charlieoconor

10/04/2017 at 02:07PM

17
#57 - Luke Bryant / LukeBryant55

10/08/2017 at 11:13AM

17
#58 - Chris Atanasian / ChrisAtanasian

10/11/2017 at 09:13PM

17
#59 - Michail Pishchagin / mblsha

10/22/2017 at 02:55PM

17
#60 - Turkey Man / lvturkeyman

11/08/2017 at 05:36AM