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):
17
#61 - Juuso Valkeejärvi / @jussovalk

11/10/2017 at 08:55PM

17
#62 - Benoit Mortgat / @Benoit_Mortgat

11/13/2017 at 09:02PM

17
#63 - OPChrom / @OPChrom

11/14/2017 at 02:38PM

17
#64 - Andrei Gasparovici / @agasparovici

12/02/2017 at 09:32AM

17
#65 - Joachim Wedin / @joachim_wedin

12/12/2017 at 04:23PM

17
#66 - Sage san / @sagesancast

12/20/2017 at 03:37PM

17
#67 - BarbaJol / @drpproteus

12/30/2017 at 05:46PM

17
#68 - Dominic Z / @thammaaa

01/03/2018 at 10:45PM

17
#69 - Alphonse Mariya / @alfunx

01/08/2018 at 09:47PM

17
#70 - ParasamGateZero / @ParasamGateZero

01/15/2018 at 07:56PM

17
#71 - Sergey Ryabko / @sergey_ryabko

01/16/2018 at 07:52PM

17
#72 - Simon Cheng / @bambooraccoon

01/19/2018 at 07:35PM

17
#73 - Rakesh P / @rakeshpgopal

01/26/2018 at 09:08AM

17
#74 - Arijus / @argshook

02/03/2018 at 01:46PM

17
#75 - deepak / @utopianmonk

02/09/2018 at 10:12AM

17
#76 - Pereant osores / @viniciusxp

02/21/2018 at 01:04PM

17
#77 - bruno / @LokoPoggi

02/24/2018 at 02:53AM

17
#78 - Guirec CORBEL / @GuirecCorbel

02/27/2018 at 01:52AM

17
#79 - LC / @leeren

03/01/2018 at 08:52AM

17
#80 - GreenPinguin / @GreenPinguin2

03/12/2018 at 10:03AM

17
#81 - Kaydo Alders / @Yousousen

03/15/2018 at 09:04PM

17
#82 - pyaillet 🤘 / @pyaillet

03/17/2018 at 02:03PM

17
#83 - vimthrowaway / @vimgolf_throw

03/30/2018 at 06:00PM

17
#84 - DHM / @DHM29978992

04/12/2018 at 12:57AM

17
#85 - Evgeny`s Kindle / @EvgenyKindle

04/24/2018 at 09:13AM

17
#86 - platypusDancing / @platypusDancing

04/26/2018 at 10:52PM

17
#87 - vimgolfdummy / @vimgolfdummy

05/05/2018 at 09:03PM

17
#88 - towc / @MateiCopot

05/25/2018 at 09:55AM

17
#89 - Ernesto Barros / @ernestobarros7

06/15/2018 at 09:47PM

17
#90 - omrisarig / @omrisarig

06/22/2018 at 02:43PM