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

345 active golfers, 1051 entries

Leaderboard (lowest score wins):
19
#211 - Adam Kożuch / @adamkozuch

08/31/2017 at 12:31PM

19
#212 - Alice Benign / @AliceBenign

09/08/2017 at 02:38AM

19
#213 - Graham Bates / @gigabates

09/17/2017 at 10:29PM

19
#214 - Christian Bauer / @Christi55765900

10/10/2017 at 04:04PM

19
#215 - popo5colo / @popo5colo1

10/31/2017 at 11:40AM

19
#216 - matthew brett / @matthewbrett

04/08/2018 at 09:19AM

19
#217 - Luke Lee / @luke0201

05/06/2018 at 05:09AM

19
#218 - Jonathan Camilleri / @Too_Many_Taken

05/24/2018 at 02:17PM

19
#219 - Jeff / @sir_wiggles3

09/08/2018 at 08:11PM

19
#220 - band / @band26376522

12/19/2018 at 08:19PM

19
#221 - wanghbxxxx / @wanghbxxxx

04/06/2019 at 07:49AM

20
#222 - MS / @schrectacular

06/07/2017 at 07:38PM

20
#223 - Daniel K. / @lan4k

06/07/2017 at 09:08PM

20
#224 - Carl Egbert / @CarlOEgbert

06/09/2017 at 05:04AM

20
#225 - jack / @jack28887741

06/09/2017 at 08:30AM

20
#226 - Sergey Lisakov / @pozitron57

06/09/2017 at 01:59PM

20
#227 - Jon Doe / @JonDoe33157611

06/13/2017 at 06:42AM

20
#228 - Daniel Smith / @_Tysonzero

06/20/2017 at 05:05PM

20
#229 - el pollo diablo / @bjagojevich

06/21/2017 at 07:22PM

20
#230 - Cody Heimberger / @certifiedloud

07/08/2017 at 04:59AM

20
#231 - Gurukandhamoorthi / @Gurukandhamoor1

07/09/2017 at 12:32PM

20
#232 - 黒澤亮二 / @rjkuro

07/18/2017 at 02:52PM

20
#233 - Adrian Staniec / @adrianstaniec

08/06/2017 at 04:26PM

20
#234 - toddkoym / @toddkoym

08/07/2017 at 09:39PM

20
#235 - Ryan Patterson / @CGamesPlay

08/18/2017 at 03:07AM

20
#236 - Marcin Paliwoda / @eukaliptuss

08/25/2017 at 01:20PM

20
#237 - Jeremy Huiskamp / @jeremyhuiskamp

09/01/2017 at 08:18PM

20
#238 - Brian Vodicka / @BrianVodicka2

09/09/2017 at 09:37PM

20
#239 - xer0.5ive / @Bibekshah

09/22/2017 at 08:50PM

20
#240 - sehe / @sehetw

10/10/2017 at 01:42PM