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

Modernise code

Modernise and clean up some C++ code.

Start file
std::vector<int> numbers;
numbers.push_back(1337);
numbers.push_back(424242);
numbers.push_back(12345678);
numbers.push_back(3141);
End file
auto numbers = { 1337, 424242, 12345678, 3141 };

View Diff

1,5c1
< std::vector<int> numbers;
< numbers.push_back(1337);
< numbers.push_back(424242);
< numbers.push_back(12345678);
< numbers.push_back(3141);
---
> auto numbers = { 1337, 424242, 12345678, 3141 };

Solutions by @_AlexLewin:

Unlock 18 remaining solutions by signing in and submitting your own entry
Created by: @nd1832

316 active golfers, 1368 entries

Solutions by @_AlexLewin:
42
#144 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:16AM

43
#>153 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:14AM

43
#>153 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:15AM

46
#>193 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:05AM

46
#>193 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:08AM

47
#>202 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:03AM

47
#>202 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:07AM

47
#>202 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:10AM

52
#>235 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:01AM

53
#>244 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:59AM

53
#>244 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:02AM

53
#>244 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:06AM

54
#>252 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:57AM

58
#>269 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:13AM

63
#>286 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:56AM

67
#>289 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:51AM

78
#>300 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:45AM

83
#>301 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:43AM