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):
19
#301 - wanghbxxxx / @wanghbxxxx

04/06/2019 at 07:49AM

19
#302 - Ivo Blöchliger / @aigledesalpes

08/04/2019 at 07:40PM

19
#303 - Ariel Miculas / @ArielMiculas

09/23/2019 at 03:23PM

19
#304 - BESSENG A IREH Guy / @guybesseng

12/23/2019 at 09:32PM

19
#305 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 07:21PM

20
#306 - MS / @schrectacular

06/07/2017 at 07:38PM

20
#307 - Daniel K. / @lan4k

06/07/2017 at 09:08PM

20
#308 - Carl Egbert / @CarlOEgbert

06/09/2017 at 05:04AM

20
#309 - jack / @jack28887741

06/09/2017 at 08:30AM

20
#310 - Sergey Lisakov / @pozitron57

06/09/2017 at 01:59PM

20
#311 - Jon Doe / @JonDoe33157611

06/13/2017 at 06:42AM

20
#312 - Daniel Smith / @_Tysonzero

06/20/2017 at 05:05PM

20
#313 - el pollo diablo / @bjagojevich

06/21/2017 at 07:22PM

20
#314 - Cody Heimberger / @certifiedloud

07/08/2017 at 04:59AM

20
#315 - Gurukandhamoorthi / @Gurukandhamoor1

07/09/2017 at 12:32PM

20
#316 - 黒澤亮二 / @rjkuro

07/18/2017 at 02:52PM

20
#317 - Adrian Staniec / @adrianstaniec

08/06/2017 at 04:26PM

20
#318 - toddkoym / @toddkoym

08/07/2017 at 09:39PM

20
#319 - Ryan Patterson / @CGamesPlay

08/18/2017 at 03:07AM

20
#320 - Marcin Paliwoda / @eukaliptuss

08/25/2017 at 01:20PM

20
#321 - Jeremy Huiskamp / @jeremyhuiskamp

09/01/2017 at 08:18PM

20
#322 - Brian Vodicka / @BrianVodicka2

09/09/2017 at 09:37PM

20
#323 - xer0.5ive / @Bibekshah

09/22/2017 at 08:50PM

20
#324 - sehe / @sehetw

10/10/2017 at 01:42PM

20
#325 - Stephen Betts / @stephenbetts

10/11/2017 at 02:58PM

20
#326 - Sam Coy / @samthecoy

11/02/2017 at 03:26PM

20
#327 - Philippe / @cloonn1

11/03/2017 at 09:59PM

20
#328 - Max Krogius / @MaxKrogius

02/23/2018 at 03:33PM

20
#329 - Yousef Mohamed / @MohamedYoyo94

03/12/2018 at 10:22PM

20
#330 - Matt Aschmann / @ma7hatter

05/29/2018 at 09:59PM