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

455 active golfers, 1503 entries

Leaderboard (lowest score wins):
17
#121 - Viktor Styrud / @ViktorStyrud

10/08/2019 at 07:19AM

17
#122 - Mario Olofo / @mario_olofo

10/23/2019 at 12:58AM

17
#123 - vimgolfer / @vimgolfer7

11/03/2019 at 11:14PM

17
#124 - vicver09 / @vicver091

12/18/2019 at 07:01PM

17
#125 - skamgolf / @skamgolf

12/21/2019 at 09:09PM

17
#126 - James Casey / @hanavi

12/21/2019 at 09:46PM

17
#127 - Delon / @delonleonard

12/31/2019 at 10:53AM

17
#128 - Jason Neylon / @jasonneylon

02/12/2020 at 09:30PM

17
#129 - countime / @countime1

03/12/2020 at 10:59AM

17
#130 - floyd / @floyd10086

03/20/2020 at 10:15AM

17
#131 - Jason / @roosjason

05/10/2020 at 08:07AM

17
#132 - Moatvald / @moatvald

05/17/2020 at 01:10PM

17
#133 - δΊŽε‰ζ˜Ÿ / @fishermryn

05/28/2020 at 09:40AM

17
#134 - Kevin Keefe / @KevinKeefe5

06/03/2020 at 04:41PM

17
#135 - Ming Dai / @MingDai2

07/01/2020 at 03:29PM

17
#136 - VQvMoKsy / @QvKsy

07/29/2020 at 01:12PM

17
#137 - Albrecht Uhlig / @AlbrechtUhlig

08/28/2020 at 06:29AM

17
#138 - lamtt77 / @lamtt77

11/09/2020 at 04:56AM

17
#139 - Jung Yeon Park / @park_jungy

01/09/2021 at 12:20PM

17
#140 - A A A / @37fatos

01/16/2021 at 05:31PM

17
#141 - Arya Kumar / @SusSquirrel

05/20/2021 at 03:39PM

17
#142 - Michel Viktor / @tomkpz

08/11/2021 at 07:59PM

17
#143 - russellzhaomao / @russellzhaomao

05/27/2022 at 01:20PM

17
#144 - Jay R / @RonatinJ

09/07/2022 at 06:14PM

17
#145 - Kausic / @Kausic99

09/10/2022 at 10:34PM

17
#146 - Tejaswini Deshmukh / @todeshmukh

09/10/2022 at 10:37PM

17
#147 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 04:46AM

17
#148 - Jui Ulhas Dakhave / @JuiDakhave

09/11/2022 at 06:38AM

17
#149 - Akshay Barpute / @akshaybarpute

09/11/2022 at 07:37AM

17
#150 - AbhilashSreenivasa / @AbhilashSreeni7

09/11/2022 at 06:37PM