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):
20
#211 - jack / @jack28887741

06/09/2017 at 08:30AM

20
#212 - Sergey Lisakov / @pozitron57

06/09/2017 at 01:59PM

20
#213 - Jon Doe / @JonDoe33157611

06/13/2017 at 06:42AM

20
#214 - Daniel Smith / @_Tysonzero

06/20/2017 at 05:05PM

20
#215 - el pollo diablo / @bjagojevich

06/21/2017 at 07:22PM

20
#216 - Cody Heimberger / @certifiedloud

07/08/2017 at 04:59AM

20
#217 - Gurukandhamoorthi / @Gurukandhamoor1

07/09/2017 at 12:32PM

20
#218 - 黒澤亮二 / @rjkuro

07/18/2017 at 02:52PM

20
#219 - Adrian Staniec / @adrianstaniec

08/06/2017 at 04:26PM

20
#220 - toddkoym / @toddkoym

08/07/2017 at 09:39PM

20
#221 - Ryan Patterson / @CGamesPlay

08/18/2017 at 03:07AM

20
#222 - Marcin Paliwoda / @eukaliptuss

08/25/2017 at 01:20PM

20
#223 - Jeremy Huiskamp / @jeremyhuiskamp

09/01/2017 at 08:18PM

20
#224 - Brian Vodicka / @BrianVodicka2

09/09/2017 at 09:37PM

20
#225 - xer0.5ive / @Bibekshah

09/22/2017 at 08:50PM

20
#226 - sehe / @sehetw

10/10/2017 at 01:42PM

20
#227 - Stephen Betts / @stephenbetts

10/11/2017 at 02:58PM

20
#228 - Sam Coy / @samthecoy

11/02/2017 at 03:26PM

20
#229 - Philippe / @cloonn1

11/03/2017 at 09:59PM

20
#230 - Max Krogius / @MaxKrogius

02/23/2018 at 03:33PM

20
#231 - Yousef Mohamed / @MohamedYoyo94

03/12/2018 at 10:22PM

20
#232 - Matt Aschmann / @ma7hatter

05/29/2018 at 09:59PM

20
#233 - なにそれ / @lolcircle

06/01/2018 at 07:21AM

20
#234 - 최종원 / @lastone9182

07/17/2018 at 02:48PM

20
#235 - yqu212 / @yqu212

07/27/2018 at 09:10AM

20
#236 - fdasfasfasga / @deteriorateredu

09/17/2018 at 11:40PM

20
#237 - Juliette but spooky / @namebrandloser

10/26/2018 at 11:24PM

20
#238 - vg / @vg53210350

10/29/2018 at 02:59AM

20
#239 - Luis Rodriguez / @luisthecoder

11/13/2018 at 03:14AM

21
#240 - sebastian pech / @specht08

06/08/2017 at 10:45AM