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

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

325 active golfers, 1409 entries

Solutions by @gotovimpro1:
34
#52 - gotovimpro / @gotovimpro1

09/13/2022 at 02:33PM

35
#>91 - gotovimpro / @gotovimpro1

09/13/2022 at 02:29PM

36
#>104 - gotovimpro / @gotovimpro1

09/13/2022 at 02:27PM

37
#>115 - gotovimpro / @gotovimpro1

09/13/2022 at 02:25PM

39
#>125 - gotovimpro / @gotovimpro1

09/13/2022 at 02:20PM

40
#>133 - gotovimpro / @gotovimpro1

09/13/2022 at 02:16PM

41
#>137 - gotovimpro / @gotovimpro1

09/13/2022 at 02:11PM

43
#>158 - gotovimpro / @gotovimpro1

09/13/2022 at 02:06PM

52
#>243 - gotovimpro / @gotovimpro1

09/13/2022 at 01:50PM

64
#>294 - gotovimpro / @gotovimpro1

09/12/2022 at 02:28PM

76
#>309 - gotovimpro / @gotovimpro1

09/13/2022 at 01:44PM

78
#>309 - gotovimpro / @gotovimpro1

09/12/2022 at 02:13PM

80
#>310 - gotovimpro / @gotovimpro1

09/12/2022 at 01:51PM

85
#>313 - gotovimpro / @gotovimpro1

09/12/2022 at 02:01PM

91
#>313 - gotovimpro / @gotovimpro1

09/12/2022 at 01:27PM

105
#>314 - gotovimpro / @gotovimpro1

09/12/2022 at 02:34PM