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

307 active golfers, 1333 entries

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

07/12/2022 at 03:16AM

43
#>149 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:14AM

43
#>149 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:15AM

46
#>188 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:05AM

46
#>188 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:08AM

47
#>196 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:03AM

47
#>196 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:07AM

47
#>196 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:10AM

52
#>229 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:01AM

53
#>237 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:59AM

53
#>237 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:02AM

53
#>237 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:06AM

54
#>245 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:57AM

58
#>261 - Alex Lewin / @_AlexLewin

07/12/2022 at 03:13AM

63
#>278 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:56AM

67
#>281 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:51AM

78
#>291 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:45AM

83
#>292 - Alex Lewin / @_AlexLewin

07/12/2022 at 02:43AM