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):
20
#331 - Max Krogius / @MaxKrogius

02/23/2018 at 03:33PM

20
#332 - Yousef Mohamed / @MohamedYoyo94

03/12/2018 at 10:22PM

20
#333 - Matt Aschmann / @ma7hatter

05/29/2018 at 09:59PM

20
#334 - なにそれ / @lolcircle

06/01/2018 at 07:21AM

20
#335 - 최종원 / @lastone9182

07/17/2018 at 02:48PM

20
#336 - yqu212 / @yqu212

07/27/2018 at 09:10AM

20
#337 - fdasfasfasga / @deteriorateredu

09/17/2018 at 11:40PM

20
#338 - Jules / @namebrandloser

10/26/2018 at 11:24PM

20
#339 - vg / @vg53210350

10/29/2018 at 02:59AM

20
#340 - Luis Rodriguez / @luisthecoder

11/13/2018 at 03:14AM

20
#341 - CptBong / @cpt1bong

12/04/2018 at 12:47AM

20
#342 - GrimmT / @GrimmT10

11/02/2019 at 09:32AM

20
#343 - Quentin Leroy / @qnleroy

05/15/2020 at 05:20AM

20
#344 - Lukasz Anforowicz / @LAnforowicz

05/28/2020 at 03:32AM

20
#345 - RockerZZY / @rocker_zzy

06/08/2020 at 04:30AM

20
#346 - Kaustubh Murumkar / @k_austub_h

09/26/2020 at 12:22AM

20
#347 - Francois Marais / @maraisf

05/19/2021 at 12:09PM

20
#348 - Brandon / @Brandon10678836

08/26/2022 at 12:56PM

20
#349 - Neo / @neothetranquil

09/11/2022 at 08:08AM

20
#350 - 咸糖🎯 / @GIA917229015

01/04/2024 at 02:30PM

20
#351 - luke37842 / @luke37842

05/16/2024 at 10:12AM

20
#352 - KoroneListener / @KoroneListener

09/04/2024 at 02:58PM

20
#353 - Theau Poulat / @theaupoulat

04/03/2025 at 12:37PM

21
#354 - sebastian pech / @specht08

06/08/2017 at 10:45AM

21
#355 - Basile Perrenoud / @BP_DK_

06/08/2017 at 12:13PM

21
#356 - Ryan Coopersmith / @RyanCoopersmit1

06/10/2017 at 01:03AM

21
#357 - Will Gunther / @WillGunther

06/11/2017 at 06:32PM

21
#358 - j00b00 / @j00b00

06/13/2017 at 11:08PM

21
#359 - Thomas / @thomasauros

06/14/2017 at 10:27PM

21
#360 - Daniel Oosthuizen / @daan7jie

06/20/2017 at 11:29AM