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):
21
#361 - Christian Panadero / @PaNaVTEC

07/11/2017 at 09:23PM

21
#362 - FunkySayu / @FunkySayu

07/17/2017 at 09:18PM

21
#363 - Ildar Gilfanov / @Ildar_Razin

07/22/2017 at 05:53AM

21
#364 - Anton Outkine / @AOutkine

08/07/2017 at 02:21AM

21
#365 - Brandon Height / @Lask0x

08/08/2017 at 01:08AM

21
#366 - Cheer / @yougec

08/11/2017 at 02:49AM

21
#367 - Alejandro Catalina / @AleexCatalina

09/13/2017 at 06:17PM

21
#368 - James Houghton / @jamesthoughton

09/16/2017 at 09:21PM

21
#369 - jirgn / @jirgn

09/17/2017 at 07:30PM

21
#370 - Joe Reddington / @joereddington

11/14/2017 at 11:59AM

21
#371 - ؜ / @h43z

01/04/2018 at 03:14PM

21
#372 - c0llision / @sh3llcode

01/26/2018 at 10:41AM

21
#373 - phucvin / @phucvin

02/14/2018 at 04:30PM

21
#374 - 서강훈 / @shirano150

04/03/2018 at 07:53AM

21
#375 - alloy1090 / @alloy1090

08/17/2018 at 12:00AM

21
#376 - Víctor López / @viticlick

08/22/2018 at 11:34AM

21
#377 - Austin Middleton / @austinitek

09/17/2018 at 11:34PM

21
#378 - Kyle Safran / @kylesafran

01/22/2019 at 10:31PM

21
#379 - Scott Smith / @Scottaino

01/07/2020 at 05:41PM

21
#380 - Michael Meixner / @meixner62

01/23/2020 at 02:11PM

21
#381 - drGsus / @drGsus

07/29/2020 at 08:52AM

22
#382 - joshuathurston1 / @joshuathurston1

06/07/2017 at 11:10PM

22
#383 - Tallak Tveide / @tallakt

06/20/2017 at 07:30AM

22
#384 - Mayank Suman / @mayank_suman

06/24/2017 at 03:29PM

22
#385 - grigouille / @grigouille2

06/25/2017 at 07:47PM

22
#386 - Ben Hill / @KaizenSoze70

06/29/2017 at 11:59AM

22
#387 - Benjamin Unger / @Ben_Unger

08/16/2017 at 07:35PM

22
#388 - Cyrus Nikolaidis / @CyrusNikolaidis

08/21/2017 at 01:39AM

22
#389 - ryuugekisya / @ryuugekisya

11/04/2017 at 10:16AM

22
#390 - usermod / @g_usermod

11/21/2017 at 09:43AM