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

354 active golfers, 1083 entries

Leaderboard (lowest score wins):
18
#181 - 赤佐田奈葉 / @akasatanaha_

07/11/2018 at 09:12AM

18
#182 - steph-query / @StephQuery

07/13/2018 at 08:33PM

18
#183 - Francesco Sacchi / @depsir

07/17/2018 at 05:09PM

18
#184 - Frank Korf / @OMGFrank

08/28/2018 at 07:39PM

18
#185 - Not real / @Notreal70353016

09/21/2018 at 10:00PM

18
#186 - Rasmus Bergström / @JRasmusBm

09/27/2018 at 03:34PM

18
#187 - Roger Bongers / @RogerBongers

10/06/2018 at 04:04PM

18
#188 - Dave Brda / @BrdaDave

10/31/2018 at 02:57AM

18
#189 - Brendan B Amdocs / @AmdocsB

11/06/2018 at 03:45PM

18
#190 - name / @name65894813

11/15/2018 at 07:02PM

18
#191 - abgalphabet / @abgalphabet

01/22/2019 at 12:31PM

18
#192 - TimMcGuire / @mcguire

02/04/2019 at 07:08PM

18
#193 - 默罕默德 / @Rt6RjEAJ987Woes

02/19/2019 at 09:34AM

18
#194 - james_bunch / @james_bunch

04/20/2019 at 08:00AM

18
#195 - Tom Cammann / @tea_sea

05/03/2019 at 08:48AM

18
#196 - Sherab Giovannini / @shaddycls

05/03/2019 at 08:46PM

18
#197 - Nick Yeow / @nickyeow

05/24/2019 at 02:59PM

19
#198 - Joseph Barratt / @josuf107

06/07/2017 at 07:39PM

19
#199 - AleksandarTrifunovic / @akstrfn

06/07/2017 at 08:26PM

19
#200 - EQMac MGBs / @EQMacMGBs

06/07/2017 at 09:37PM

19
#201 - シカ / @pigaccel

06/08/2017 at 07:20AM

19
#202 - Andrey / @andreyrmg

06/08/2017 at 08:01AM

19
#203 - Colby Hamilton / @ColbyHamilton5

06/09/2017 at 07:40PM

19
#204 - Sebastian Korten / @FlashKorten

06/10/2017 at 11:37AM

19
#205 - Scott Mills / @smm1729

06/11/2017 at 03:24AM

19
#206 - Миша Сорокин / @rafmikovi4

06/15/2017 at 01:19PM

19
#207 - Chris Clement / @Null_is_Null

06/16/2017 at 07:42PM

19
#208 - Ian Isaac Emnace / @29forte95

06/19/2017 at 01:08PM

19
#209 - Michael Rees / @reesmichael1

06/22/2017 at 11:03PM

19
#210 - Brendan G / @Brendan314

06/27/2017 at 06:42PM