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 by @Kausic99:

Unlock 13 remaining solutions by signing in and submitting your own entry
Created by: @toddagibson

460 active golfers, 1513 entries

Solutions by @Kausic99:
17
#145 - Kausic / @Kausic99

09/10/2022 at 10:34PM

18
#>264 - Kausic / @Kausic99

09/10/2022 at 10:33PM

19
#>308 - Kausic / @Kausic99

09/10/2022 at 10:31PM

20
#>348 - Kausic / @Kausic99

09/10/2022 at 10:29PM

21
#>385 - Kausic / @Kausic99

09/10/2022 at 10:22PM

22
#>402 - Kausic / @Kausic99

09/10/2022 at 10:19PM

23
#>415 - Kausic / @Kausic99

09/10/2022 at 10:17PM

24
#>419 - Kausic / @Kausic99

09/10/2022 at 10:14PM

25
#>424 - Kausic / @Kausic99

09/10/2022 at 10:07PM

28
#>437 - Kausic / @Kausic99

09/10/2022 at 09:59PM

31
#>442 - Kausic / @Kausic99

09/10/2022 at 09:50PM

33
#>453 - Kausic / @Kausic99

09/10/2022 at 09:47PM

37
#>453 - Kausic / @Kausic99

09/10/2022 at 09:41PM