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

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

323 active golfers, 1400 entries

Solutions by @saurabhDuzumaki:
34
#53 - Saurabh / @saurabhDuzumaki

09/26/2022 at 07:01AM

35
#>90 - Saurabh / @saurabhDuzumaki

09/26/2022 at 07:00AM

36
#>103 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:55AM

37
#>114 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:54AM

39
#>124 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:51AM

40
#>132 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:49AM

41
#>136 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:48AM

42
#>148 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:46AM

44
#>179 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:45AM

45
#>190 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:40AM

46
#>199 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:37AM

47
#>208 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:35AM

48
#>221 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:32AM

49
#>225 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:30AM

52
#>241 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:28AM

64
#>292 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:27AM

124
#>315 - Saurabh / @saurabhDuzumaki

09/26/2022 at 06:14AM