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

460 active golfers, 1513 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

17
#104 - Mihai / @mihaicristiant

12/03/2018 at 01:55PM

17
#105 - Tomás Cetkovich / @SaladeDeMerde

01/16/2019 at 01:26AM

17
#106 - Dryvnt / @Dryvnt

04/04/2019 at 01:26PM

17
#107 - alekfed / @alek_fed

04/15/2019 at 08:48AM

17
#108 - Grant / @grant_7788

04/30/2019 at 01:44AM

17
#109 - Kai.Li / @KaiLi19

05/07/2019 at 06:29AM

17
#110 - Sæther / @baltre1

06/07/2019 at 02:56PM

17
#111 - BunFluffman / @BFluffman

06/08/2019 at 12:43PM

17
#112 - majo senf / @majo_senf

06/17/2019 at 11:23AM

17
#113 - mkaminaga / @mkmng3

07/01/2019 at 05:50AM

17
#114 - Chester Yap / @Chest_ErYap

07/14/2019 at 01:18PM

17
#115 - Miłosz Łakomy / @foobar01123

07/15/2019 at 05:55AM

17
#116 - 🦉 / @die_4001

07/25/2019 at 03:03PM

17
#117 - Markus / @ARealAnnoyance

07/31/2019 at 01:59AM

17
#118 - Rasmus Öhman Bruno / @rasmohman

08/03/2019 at 08:16PM

17
#119 - sooqua / @sooqua

08/08/2019 at 10:31PM

17
#120 - Isaak Meier / @IsaakMeier

08/15/2019 at 05:52PM