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

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

451 active golfers, 1475 entries

Solutions by @parrth1808:
17
#155 - Parrth Pandey / @parrth1808

09/12/2022 at 05:21AM

24
#>410 - Parrth Pandey / @parrth1808

09/12/2022 at 05:20AM

27
#>423 - Parrth Pandey / @parrth1808

09/12/2022 at 05:19AM

28
#>428 - Parrth Pandey / @parrth1808

09/12/2022 at 05:17AM

29
#>429 - Parrth Pandey / @parrth1808

09/12/2022 at 05:16AM

30
#>431 - Parrth Pandey / @parrth1808

09/12/2022 at 05:13AM

31
#>433 - Parrth Pandey / @parrth1808

09/12/2022 at 05:11AM

32
#>440 - Parrth Pandey / @parrth1808

09/12/2022 at 05:10AM

33
#>444 - Parrth Pandey / @parrth1808

09/11/2022 at 09:48PM

38
#>446 - Parrth Pandey / @parrth1808

09/11/2022 at 09:47PM

39
#>446 - Parrth Pandey / @parrth1808

09/11/2022 at 09:29PM

54
#>449 - Parrth Pandey / @parrth1808

09/11/2022 at 09:20PM

80
#>450 - Parrth Pandey / @parrth1808

09/11/2022 at 09:15PM