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

322 active golfers, 991 entries

Leaderboard (lowest score wins):
17
#91 - Daniël De Koker / @daniel_koker

07/01/2018 at 03:43PM

17
#92 - Gemille Ford / @gemilleford

07/06/2018 at 12:44AM

17
#93 - mass / @mass256

07/09/2018 at 06:10AM

17
#94 - Paul Kirby / @AirbornePorcine

07/12/2018 at 03:44PM

17
#95 - Artūras Zakrevskis / @AZakrevskis

07/12/2018 at 03:53PM

17
#96 - Joao Figueiredo / @j1fig

07/12/2018 at 03:58PM

17
#97 - Chris Dean / @ChrisDe62379742

07/18/2018 at 07:07PM

17
#98 - Andrew Peterson / @FungalRaincloud

07/29/2018 at 09:46PM

17
#99 - Simon Ingelsson / @_DeVVaN_

08/16/2018 at 09:16AM

17
#100 - fucus / @fishlovebanana

08/17/2018 at 10:26AM

17
#101 - royer / @RoyerMoyer1

09/23/2018 at 05:13PM

17
#102 - Benjamin Kiesl / @BenjaminKiesl

10/16/2018 at 12:38PM

17
#103 - Dax / @zacoxi

11/20/2018 at 02:44AM

18
#104 - Kai Yuan / @kentyuan

06/07/2017 at 07:54PM

18
#105 - Cristian / @cris_perez_b

06/07/2017 at 09:37PM

18
#106 - James / @Dronak

06/07/2017 at 10:26PM

18
#107 - Tony Pajamas / @trash_pajamas

06/08/2017 at 04:51AM

18
#108 - klaxalk / @klaxalk

06/08/2017 at 07:25AM

18
#109 - Jan Bundesmann / @janbundesmann

06/08/2017 at 08:55AM

18
#110 - Victor Ramirez / @virako

06/08/2017 at 08:56AM

18
#111 - Daniel Hjelm / @dhjelm

06/08/2017 at 05:36PM

18
#112 - Brian Hall / @_bruab_

06/09/2017 at 02:54PM

18
#113 - Nimrod / @n1mr0d

06/10/2017 at 02:39PM

18
#114 - Daren Hayward / @DarenHayward

06/11/2017 at 09:16AM

18
#115 - James Bernsen / @jamesbernsen

06/11/2017 at 03:52PM

18
#116 - Lifepillar / @lifepillar

06/11/2017 at 08:23PM

18
#117 - やま / @K6rzv7URxtE6CFy

06/12/2017 at 11:29AM

18
#118 - kkh / @kkhdlut

06/14/2017 at 02:56PM

18
#119 - Emmanuel Herrero / @hairarrow

06/14/2017 at 07:00PM

18
#120 - John Smith / @john828495

06/16/2017 at 12:59PM