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

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

129 active golfers, 540 entries

Solutions by @F4k3K0n70:
31
#33 - Fake Konto / @F4k3K0n70

02/14/2021 at 02:50PM

32
#>47 - Fake Konto / @F4k3K0n70

02/14/2021 at 02:47PM

33
#>54 - Fake Konto / @F4k3K0n70

02/14/2021 at 02:43PM

34
#>57 - Fake Konto / @F4k3K0n70

02/14/2021 at 02:41PM

39
#>102 - Fake Konto / @F4k3K0n70

02/14/2021 at 02:35PM