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

328 active golfers, 1420 entries

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

07/12/2022 at 03:16AM

43
#>159 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:14AM

43
#>159 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:15AM

46
#>201 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:05AM

46
#>201 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:08AM

47
#>210 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:03AM

47
#>210 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:07AM

47
#>210 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:10AM

52
#>244 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:01AM

53
#>253 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:59AM

53
#>253 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:02AM

53
#>253 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:06AM

54
#>261 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:57AM

58
#>278 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:13AM

63
#>295 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:56AM

67
#>299 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:51AM

78
#>311 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:45AM

83
#>312 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:43AM