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

460 active golfers, 1513 entries

Leaderboard (lowest score wins):
22
#391 - Benjamin Unger / @Ben_Unger

08/16/2017 at 07:35PM

22
#392 - Cyrus Nikolaidis / @CyrusNikolaidis

08/21/2017 at 01:39AM

22
#393 - ryuugekisya / @ryuugekisya

11/04/2017 at 10:16AM

22
#394 - usermod / @g_usermod

11/21/2017 at 09:43AM

22
#395 - amal / @cdsudama

04/12/2018 at 02:38AM

22
#396 - nomsayin / @nomsayin

04/16/2018 at 03:25AM

22
#397 - zenwalker / @zenwalker93

03/10/2019 at 04:41PM

22
#398 - 2xRon / @2cdotRon

05/15/2019 at 02:07AM

22
#399 - Chris G / @AboutThatThing

06/12/2019 at 03:22PM

22
#400 - Aioriya / @AioriyaDonk

08/28/2019 at 03:19AM

22
#401 - Aaron / @_Lordofthevoid_

11/30/2019 at 04:35PM

22
#402 - kafang plays vimgolf / @KafangV

12/18/2020 at 04:04AM

22
#403 - Alex Elarbee / @elarbee

10/18/2024 at 12:18AM

23
#404 - Ara Hacopian / @ahacop

06/07/2017 at 08:58PM

23
#405 - Ayman Farhat / @aymanfarhat

06/09/2017 at 09:25AM

23
#406 - Patrick Sanan / @patricksanan

06/13/2017 at 01:48PM

23
#407 - samullman / @samullman

06/20/2017 at 07:07AM

23
#408 - Stop and think / @ms_uncountable

07/07/2017 at 02:51PM

23
#409 - Brony PlusOne / @BronyPlusOne

08/04/2017 at 11:29PM

23
#410 - dadav 🥀 / @__dadav__

08/14/2017 at 08:02PM

23
#411 - Daniel de Vries / @devries_d

02/12/2018 at 03:55PM

23
#412 - Владислав / @papa_gusserl

08/08/2018 at 05:11PM

23
#413 - etwyniel / @etwyniel

12/31/2018 at 05:26PM

23
#414 - Daniel Latzer / @tournqat

12/19/2019 at 02:31PM

23
#415 - JimmyGymglish / @JGymglish

01/14/2020 at 02:52PM

23
#416 - Austin Willliams / @GuitarMusash616

11/14/2022 at 03:57AM

24
#417 - Adam Bozanich / @abozanich

06/08/2017 at 01:24AM

24
#418 - Meriadec Pillet / @loomisBroom

06/18/2017 at 05:03PM

24
#419 - Lukas Galke / @_lpag

06/25/2017 at 10:03PM

25
#420 - korneev alexey / @kornei4

06/08/2017 at 08:40AM