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

334 active golfers, 1026 entries

Leaderboard (lowest score wins):
20
#241 - yqu212 / @yqu212

07/27/2018 at 09:10AM

20
#242 - fdasfasfasga / @deteriorateredu

09/17/2018 at 11:40PM

20
#243 - Juliette but spooky / @namebrandloser

10/26/2018 at 11:24PM

20
#244 - vg / @vg53210350

10/29/2018 at 02:59AM

20
#245 - Luis Rodriguez / @luisthecoder

11/13/2018 at 03:14AM

20
#246 - CptBong / @cpt1bong

12/04/2018 at 12:47AM

21
#247 - sebastian pech / @specht08

06/08/2017 at 10:45AM

21
#248 - Basile Perrenoud / @BP_DK_

06/08/2017 at 12:13PM

21
#249 - Ryan Coopersmith / @RyanCoopersmit1

06/10/2017 at 01:03AM

21
#250 - Will Gunther / @WillGunther

06/11/2017 at 06:32PM

21
#251 - j00b00 / @j00b00

06/13/2017 at 11:08PM

21
#252 - Thomas / @thomasauros

06/14/2017 at 10:27PM

21
#253 - Daniel Oosthuizen / @daan7jie

06/20/2017 at 11:29AM

21
#254 - Derek Schrock / @derekschrock

06/23/2017 at 12:30AM

21
#255 - Ivan Poroliev / @p0pac

07/02/2017 at 04:05PM

21
#256 - Yann Vanhalewyn / @yannvanhalewyn

07/06/2017 at 02:54AM

21
#257 - flykule / @flykule

07/09/2017 at 09:01AM

21
#258 - Christian Panadero / @PaNaVTEC

07/11/2017 at 09:23PM

21
#259 - FunkySayu / @FunkySayu

07/17/2017 at 09:18PM

21
#260 - Ildar Gilfanov / @Ildar_Razin

07/22/2017 at 05:53AM

21
#261 - Anton Outkine / @AOutkine

08/07/2017 at 02:21AM

21
#262 - Brandon Height / @Lask0x

08/08/2017 at 01:08AM

21
#263 - Cheer / @yougec

08/11/2017 at 02:49AM

21
#264 - Alejandro Catalina / @AleexCatalina

09/13/2017 at 06:17PM

21
#265 - James Houghton / @jamesthoughton

09/16/2017 at 09:21PM

21
#266 - jirgn / @jirgn

09/17/2017 at 07:30PM

21
#267 - Joe Reddington / @joereddington

11/14/2017 at 11:59AM

21
#268 - h43z / @h43z

01/04/2018 at 03:14PM

21
#269 - c0llision / @sh3llcode

01/26/2018 at 10:41AM

21
#270 - phucvin / @phucvin

02/14/2018 at 04:30PM