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 5ba4962fbbac05000bc2ddec

Preferably without multi-cursor plugin

Originally asked as question on reddit by kpthunder: https://www.reddit.com/r/vim/comments/9fvsro/what_is_the_most_efficient_way_to_go_about/

Start file
newState.set('foo', foo);
newState.set('bar', bar);
newState.set('banana', banana);
newState.set('bears', bears);
End file
state.foo = payload.foo;
state.bar = payload.bar;
state.banana = payload.banana;
state.bears = payload.bears;

View Diff

1,4c1,4
< newState.set('foo', foo);
< newState.set('bar', bar);
< newState.set('banana', banana);
< newState.set('bears', bears);
---
> state.foo = payload.foo;
> state.bar = payload.bar;
> state.banana = payload.banana;
> state.bears = payload.bears;

Solutions by @z00master:

Unlock 12 remaining solutions by signing in and submitting your own entry
Created by: @argshook

129 active golfers, 540 entries

Solutions by @z00master:
31
#38 - z00master / @z00master

09/06/2022 at 05:13PM

32
#>47 - z00master / @z00master

09/06/2022 at 05:13PM

33
#>55 - z00master / @z00master

09/06/2022 at 05:12PM

34
#>58 - z00master / @z00master

09/06/2022 at 05:12PM

35
#>67 - z00master / @z00master

09/06/2022 at 05:11PM

36
#>80 - z00master / @z00master

09/06/2022 at 05:09PM

37
#>88 - z00master / @z00master

09/06/2022 at 05:08PM

38
#>93 - z00master / @z00master

09/06/2022 at 05:07PM

39
#>103 - z00master / @z00master

09/06/2022 at 05:07PM

40
#>105 - z00master / @z00master

09/06/2022 at 05:06PM

42
#>114 - z00master / @z00master

09/06/2022 at 05:05PM

45
#>121 - z00master / @z00master

09/06/2022 at 05:03PM