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

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

116 active golfers, 476 entries

Solutions by @treb03683130:
31
#32 - treb / @treb03683130

03/12/2021 at 03:16PM

32
#>40 - treb / @treb03683130

03/12/2021 at 03:14PM

33
#>47 - treb / @treb03683130

03/12/2021 at 03:13PM

34
#>50 - treb / @treb03683130

03/12/2021 at 03:12PM

35
#>58 - treb / @treb03683130

03/12/2021 at 03:09PM

36
#>71 - treb / @treb03683130

03/12/2021 at 03:07PM