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

370 active golfers, 1132 entries

Leaderboard (lowest score wins):
23
#331 - etwyniel / @etwyniel

12/31/2018 at 05:26PM

24
#332 - Adam Bozanich / @abozanich

06/08/2017 at 01:24AM

24
#333 - Meriadec Pillet / @loomisBroom

06/18/2017 at 05:03PM

24
#334 - Lukas Galke / @_lpag

06/25/2017 at 10:03PM

25
#335 - korneev alexey / @kornei4

06/08/2017 at 08:40AM

25
#336 - Sébastien Canart / @kokotchY

10/28/2017 at 09:10AM

25
#337 - Dmitry Ilyin / @widgetii

05/05/2018 at 08:05PM

25
#338 - prince ducaca / @prince_du_caca

09/29/2018 at 03:06PM

26
#339 - Arch Menzies / @ArchMenzies

06/14/2017 at 03:47PM

26
#340 - Damien BRY ⚡️ / @orbmancer

10/10/2017 at 08:38AM

26
#341 - Tim Varley / @varleti

11/08/2017 at 08:50PM

26
#342 - JvdB01 / @JvdB001

05/08/2019 at 10:27PM

27
#343 - Nikola Dodik / @dodiknikola

11/14/2017 at 04:46PM

27
#344 - Gabriel Walford / @gtwalford

09/07/2018 at 07:15PM

27
#345 - ʎɐɹ / @staticjak

09/07/2018 at 07:25PM

27
#346 - Mark Watson / @mrkrwtsn

09/07/2018 at 07:30PM

28
#347 - chamow / @sbakeugs

06/22/2017 at 07:41AM

28
#348 - Tom Taylor / @larsonsduck

07/14/2017 at 02:39PM

28
#349 - Eric Ahlberg / @e_ahlberg

11/23/2017 at 08:26PM

28
#350 - Fabio Branquinho / @branquif

11/08/2018 at 08:13PM

28
#351 - Jurica / @Jurica34581259

11/15/2018 at 01:01AM

29
#352 - Bruce.Z.Lee / @cvilo4ZLK3OD9WG

01/29/2019 at 03:51AM

30
#353 - Sebastian Müller / @echsberde

08/20/2017 at 09:53PM

30
#354 - Geoff / @RealGeoffErwin

09/28/2017 at 08:01PM

31
#355 - Jye Sawtell-Rickson / @jsawtellrickson

06/18/2017 at 08:39AM

32
#356 - Daniel Casadevall / @DCasadevallPino

06/13/2017 at 11:54PM

32
#357 - Stuart Freeman / @seriouslyuguys

08/23/2017 at 06:14PM

32
#358 - Brandon Emery Craig / @iambcraig

09/07/2018 at 07:26PM

32
#359 - Aaron Rich / @Douglefish

09/07/2018 at 08:57PM

32
#360 - robinro / @robinro

11/22/2018 at 07:34PM