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

444 active golfers, 1450 entries

Leaderboard (lowest score wins):
20
#331 - GrimmT / @GrimmT10

11/02/2019 at 09:32AM

20
#332 - Quentin Leroy / @qnleroy

05/15/2020 at 05:20AM

20
#333 - Lukasz Anforowicz / @LAnforowicz

05/28/2020 at 03:32AM

20
#334 - RockerZZY / @rocker_zzy

06/08/2020 at 04:30AM

20
#335 - Kaustubh Murumkar / @k_austub_h

09/26/2020 at 12:22AM

20
#336 - Francois Marais / @maraisf

05/19/2021 at 12:09PM

20
#337 - Brandon / @Brandon10678836

08/26/2022 at 12:56PM

20
#338 - Neo / @neothetranquil

09/11/2022 at 08:08AM

21
#339 - sebastian pech / @specht08

06/08/2017 at 10:45AM

21
#340 - Basile Perrenoud / @BP_DK_

06/08/2017 at 12:13PM

21
#341 - Ryan Coopersmith / @RyanCoopersmit1

06/10/2017 at 01:03AM

21
#342 - Will Gunther / @WillGunther

06/11/2017 at 06:32PM

21
#343 - j00b00 / @j00b00

06/13/2017 at 11:08PM

21
#344 - Thomas / @thomasauros

06/14/2017 at 10:27PM

21
#345 - Daniel Oosthuizen / @daan7jie

06/20/2017 at 11:29AM

21
#346 - Derek Schrock / @derekschrock

06/23/2017 at 12:30AM

21
#347 - Ivan Poroliev / @p0pac

07/02/2017 at 04:05PM

21
#348 - Yann Vanhalewyn / @yannvanhalewyn

07/06/2017 at 02:54AM

21
#349 - flykule / @flykule

07/09/2017 at 09:01AM

21
#350 - Christian Panadero / @PaNaVTEC

07/11/2017 at 09:23PM

21
#351 - FunkySayu / @FunkySayu

07/17/2017 at 09:18PM

21
#352 - Ildar Gilfanov / @Ildar_Razin

07/22/2017 at 05:53AM

21
#353 - Anton Outkine / @AOutkine

08/07/2017 at 02:21AM

21
#354 - Brandon Height / @Lask0x

08/08/2017 at 01:08AM

21
#355 - Cheer / @yougec

08/11/2017 at 02:49AM

21
#356 - Alejandro Catalina / @AleexCatalina

09/13/2017 at 06:17PM

21
#357 - James Houghton / @jamesthoughton

09/16/2017 at 09:21PM

21
#358 - jirgn / @jirgn

09/17/2017 at 07:30PM

21
#359 - Joe Reddington / @joereddington

11/14/2017 at 11:59AM

21
#360 - ؜ / @h43z

01/04/2018 at 03:14PM