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

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

453 active golfers, 1481 entries

Solutions by @priyankavrao97:
17
#147 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 04:46AM

18
#>263 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 04:30AM

18
#>263 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 04:45AM

19
#>304 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 04:22AM

20
#>344 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 04:10AM

23
#>408 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 03:52AM

24
#>412 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 03:37AM

30
#>433 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 03:30AM

63
#>451 - Priyanka Vissamsetty Rao / @priyankavrao97

09/11/2022 at 01:07AM