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

384 active golfers, 1179 entries

Leaderboard (lowest score wins):
18
#211 - Chris Shorrock / @EbinFlow

08/17/2019 at 06:29PM

18
#212 - kevinski / @kevinsk30746831

08/22/2019 at 01:42PM

18
#213 - vimRunnerUp3000 / @VUp3000

09/02/2019 at 06:36PM

18
#214 - Lory / @Lory46845742

11/08/2019 at 02:00PM

18
#215 - pysnow530 / @pysnow530

11/25/2019 at 02:59PM

18
#216 - Rishabh Chatterjee / @RishabhChatte14

12/23/2019 at 04:37PM

18
#217 - Rui Xue / @ruirayxue

12/27/2019 at 05:50PM

19
#218 - Joseph Barratt / @josuf107

06/07/2017 at 07:39PM

19
#219 - AleksandarTrifunovic / @akstrfn

06/07/2017 at 08:26PM

19
#220 - EQMac MGBs / @EQMacMGBs

06/07/2017 at 09:37PM

19
#221 - シカ / @pigaccel

06/08/2017 at 07:20AM

19
#222 - Andrey / @andreyrmg

06/08/2017 at 08:01AM

19
#223 - Colby Hamilton / @ColbyHamilton5

06/09/2017 at 07:40PM

19
#224 - Sebastian Korten / @FlashKorten

06/10/2017 at 11:37AM

19
#225 - Scott Mills / @smm1729

06/11/2017 at 03:24AM

19
#226 - Миша Сорокин / @rafmikovi4

06/15/2017 at 01:19PM

19
#227 - Chris Clement / @Null_is_Null

06/16/2017 at 07:42PM

19
#228 - Ian Isaac Emnace / @29forte95

06/19/2017 at 01:08PM

19
#229 - Michael Rees / @reesmichael1

06/22/2017 at 11:03PM

19
#230 - Brendan G / @Brendan314

06/27/2017 at 06:42PM

19
#231 - Anne Pacalet / @_Anne_P

07/07/2017 at 02:41PM

19
#232 - Rowan Tree / @RowanTr88447528

07/21/2017 at 07:53AM

19
#233 - Vedro / @Vedro03557622

07/27/2017 at 09:26PM

19
#234 - Igor Sowinski / @IgorSowinski

08/16/2017 at 07:13PM

19
#235 - SirVimGolf / @SirVimGolf

08/23/2017 at 10:32PM

19
#236 - Jason / @linlin110

08/24/2017 at 01:28AM

19
#237 - Octave Crespel / @OCrespel

08/27/2017 at 05:06PM

19
#238 - Adam Kożuch / @adamkozuch

08/31/2017 at 12:31PM

19
#239 - Alice Benign / @AliceBenign

09/08/2017 at 02:38AM

19
#240 - Graham Bates / @gigabates

09/17/2017 at 10:29PM