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

323 active golfers, 1400 entries

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

07/12/2022 at 03:16AM

43
#>157 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:14AM

43
#>157 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:15AM

46
#>199 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:05AM

46
#>199 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:08AM

47
#>208 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:03AM

47
#>208 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:07AM

47
#>208 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:10AM

52
#>241 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:01AM

53
#>250 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:59AM

53
#>250 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:02AM

53
#>250 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:06AM

54
#>258 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:57AM

58
#>275 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:13AM

63
#>292 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:56AM

67
#>295 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:51AM

78
#>307 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:45AM

83
#>308 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:43AM