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):
18
#121 - John Smith / @johns32768

06/16/2017 at 06:43PM

18
#122 - squdle / @squdle

06/16/2017 at 06:57PM

18
#123 - Tom Sisk / @TomSisk

06/17/2017 at 03:48AM

18
#124 - Benoit Bou / @3enoit3

06/17/2017 at 10:02AM

18
#125 - moritz / @moritz45081535

06/18/2017 at 12:58PM

18
#126 - Jonathan Eidsness / @jonathaneidsnes

06/21/2017 at 03:55AM

18
#127 - vimgolfer864 / @vimgolfer864

06/21/2017 at 04:33PM

18
#128 - Julian Felix / @h4wked

06/22/2017 at 01:06PM

18
#129 - Ryan McNamara / @MadDogMcNamara

06/23/2017 at 04:15AM

18
#130 - Pfhor / @PfhorShark

06/24/2017 at 08:18PM

18
#131 - Tomasz Walotek / @uolot

06/26/2017 at 04:11PM

18
#132 - vimgolf player / @VimgolfPlayer

06/26/2017 at 11:16PM

18
#133 - Gracjan Grala / @gracjangrala

06/27/2017 at 12:32AM

18
#134 - io / @iovis9

07/03/2017 at 10:20PM

18
#135 - Dick Quixly / @DickQuixly

07/05/2017 at 01:40AM

18
#136 - Jacob Buete / @JBuete

07/07/2017 at 02:45AM

18
#137 - Dan Simmons / @simmons_dan

07/11/2017 at 04:46PM

18
#138 - Matthew Broatch / @mnbroatch

07/11/2017 at 05:40PM

18
#139 - blamitter ✏️ / @blamitter

07/20/2017 at 04:17PM

18
#140 - Etienne Dilocker / @etiennedi

07/20/2017 at 08:23PM

18
#141 - Hu Ho Xu / @huhoxu

07/25/2017 at 06:35PM

18
#142 - Sinthorion / @sinthorion

08/02/2017 at 11:11AM

18
#143 - Joonas Pihlajamaa / @jokkebk

08/03/2017 at 11:39AM

18
#144 - Baine Wedlock / @BaineWedlock

08/10/2017 at 04:44PM

18
#145 - Paul Sonkoly / @Phaul

08/16/2017 at 08:23AM

18
#146 - adeel hussain / @adeelhussain

08/24/2017 at 05:34PM

18
#147 - Rachel Murray / @RachelMurray11

08/28/2017 at 12:31PM

18
#148 - dayshade / @dayshade_7

09/04/2017 at 11:28AM

18
#149 - harpocrates744 / @harpocrates744

09/10/2017 at 10:48PM

18
#150 - 郑晓东 / @DGivxLTVopiOQap

09/13/2017 at 09:33AM