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

453 active golfers, 1481 entries

Leaderboard (lowest score wins):
20
#331 - 최종원 / @lastone9182

07/17/2018 at 02:48PM

20
#332 - yqu212 / @yqu212

07/27/2018 at 09:10AM

20
#333 - fdasfasfasga / @deteriorateredu

09/17/2018 at 11:40PM

20
#334 - Jules / @namebrandloser

10/26/2018 at 11:24PM

20
#335 - vg / @vg53210350

10/29/2018 at 02:59AM

20
#336 - Luis Rodriguez / @luisthecoder

11/13/2018 at 03:14AM

20
#337 - CptBong / @cpt1bong

12/04/2018 at 12:47AM

20
#338 - GrimmT / @GrimmT10

11/02/2019 at 09:32AM

20
#339 - Quentin Leroy / @qnleroy

05/15/2020 at 05:20AM

20
#340 - Lukasz Anforowicz / @LAnforowicz

05/28/2020 at 03:32AM

20
#341 - RockerZZY / @rocker_zzy

06/08/2020 at 04:30AM

20
#342 - Kaustubh Murumkar / @k_austub_h

09/26/2020 at 12:22AM

20
#343 - Francois Marais / @maraisf

05/19/2021 at 12:09PM

20
#344 - Brandon / @Brandon10678836

08/26/2022 at 12:56PM

20
#345 - Neo / @neothetranquil

09/11/2022 at 08:08AM

20
#346 - 咸糖🎯 / @GIA917229015

01/04/2024 at 02:30PM

20
#347 - luke37842 / @luke37842

05/16/2024 at 10:12AM

21
#348 - sebastian pech / @specht08

06/08/2017 at 10:45AM

21
#349 - Basile Perrenoud / @BP_DK_

06/08/2017 at 12:13PM

21
#350 - Ryan Coopersmith / @RyanCoopersmit1

06/10/2017 at 01:03AM

21
#351 - Will Gunther / @WillGunther

06/11/2017 at 06:32PM

21
#352 - j00b00 / @j00b00

06/13/2017 at 11:08PM

21
#353 - Thomas / @thomasauros

06/14/2017 at 10:27PM

21
#354 - Daniel Oosthuizen / @daan7jie

06/20/2017 at 11:29AM

21
#355 - Derek Schrock / @derekschrock

06/23/2017 at 12:30AM

21
#356 - Ivan Poroliev / @p0pac

07/02/2017 at 04:05PM

21
#357 - Yann Vanhalewyn / @yannvanhalewyn

07/06/2017 at 02:54AM

21
#358 - flykule / @flykule

07/09/2017 at 09:01AM

21
#359 - Christian Panadero / @PaNaVTEC

07/11/2017 at 09:23PM

21
#360 - FunkySayu / @FunkySayu

07/17/2017 at 09:18PM