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 454 remaining solutions by signing in and submitting your own entry
#455 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

455 active golfers, 1503 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 Etra / @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