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

322 active golfers, 991 entries

Leaderboard (lowest score wins):
17
#31 - akanb / @GAkt6L6SlKhy8zA

06/28/2017 at 03:36AM

17
#32 - Bennett Bernardoni / @BBernardoni

06/28/2017 at 03:54PM

17
#33 - Kieron Browne / @KieronBrowne1

06/29/2017 at 04:26PM

17
#34 - 杨洋 / @176795444

06/30/2017 at 12:28PM

17
#35 - James Thomas / @skipskipskipped

07/02/2017 at 12:30AM

17
#36 - Adrian Englhardt / @_englhardt

07/07/2017 at 09:14AM

17
#37 - Михаил Добров / @mSuGfwFz2ZNvv5b

07/08/2017 at 01:58PM

17
#38 - Jon Barker / @j0nbarker

07/12/2017 at 10:36AM

17
#39 - Amalie Stokholm / @amalie_stokholm

07/15/2017 at 07:30AM

17
#40 - Gabriel Siqueira / @Gabriel_HSiq

07/20/2017 at 11:55AM

17
#41 - huho / @huho_xu

07/25/2017 at 07:08PM

17
#42 - devoh / @devvohh

07/28/2017 at 07:14PM

17
#43 - Will / @obiwan__k3n00bi

08/03/2017 at 03:15AM

17
#44 - Ky Statham / @ijustwannacode

08/10/2017 at 06:28PM

17
#45 - Floris van Liere / @FlorisvanLiere

08/15/2017 at 08:03PM

17
#46 - Terry Ding / @TerryDing77

08/23/2017 at 03:44PM

17
#47 - Mathias Dahlhaus / @mgdahlhaus

08/26/2017 at 12:21PM

17
#48 - magicmonty / @magicmonty

08/26/2017 at 07:19PM

17
#49 - Darren Weston / @dazWestonUK

08/29/2017 at 08:10PM

17
#50 - zava / @znl1087

09/04/2017 at 05:06AM

17
#51 - bazkila@gmail.com / @bazkila

09/05/2017 at 01:58AM

17
#52 - aselaIllayaparachchi / @asela38

09/11/2017 at 03:54AM

17
#53 - Karamfil / @lz1aai

09/24/2017 at 11:30PM

17
#54 - exsaber / @exsaber508

09/25/2017 at 05:00AM

17
#55 - F / @gofilby

09/26/2017 at 08:35PM

17
#56 - Charlie OConor / @charlieoconor

10/04/2017 at 02:07PM

17
#57 - Luke Bryant / @LukeBryant55

10/08/2017 at 11:13AM

17
#58 - Chris Atanasian / @ChrisAtanasian

10/11/2017 at 09:13PM

17
#59 - Michail Pishchagin / @mblsha

10/22/2017 at 02:55PM

17
#60 - Turkey Man / @lvturkeyman

11/08/2017 at 05:36AM