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 @RonatinJ:

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

458 active golfers, 1508 entries

Solutions by @RonatinJ:
17
#144 - Jay R / @RonatinJ

09/07/2022 at 06:14PM

18
#>264 - Jay R / @RonatinJ

09/07/2022 at 06:13PM

19
#>307 - Jay R / @RonatinJ

09/07/2022 at 06:12PM

20
#>347 - Jay R / @RonatinJ

09/07/2022 at 06:12PM

21
#>383 - Jay R / @RonatinJ

09/07/2022 at 06:11PM

22
#>400 - Jay R / @RonatinJ

09/07/2022 at 06:11PM

23
#>413 - Jay R / @RonatinJ

09/07/2022 at 06:10PM

24
#>417 - Jay R / @RonatinJ

09/07/2022 at 06:10PM

25
#>422 - Jay R / @RonatinJ

09/07/2022 at 06:06PM

28
#>435 - Jay R / @RonatinJ

09/07/2022 at 06:04PM

33
#>451 - Jay R / @RonatinJ

09/07/2022 at 06:03PM

38
#>453 - Jay R / @RonatinJ

09/07/2022 at 06:02PM

54
#>455 - Jay R / @RonatinJ

09/07/2022 at 05:58PM

79
#>456 - Jay R / @RonatinJ

09/07/2022 at 05:15PM

82
#>458 - Jay R / @RonatinJ

09/07/2022 at 05:11PM