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

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

307 active golfers, 1333 entries

Solutions by @ambidextrousTx:
34
#12 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:12AM

36
#>95 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:11AM

37
#>102 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:09AM

38
#>112 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:08AM

39
#>113 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:10AM

40
#>120 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:05AM

40
#>120 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:10AM

41
#>125 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:04AM

42
#>133 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:03AM

44
#>156 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:02AM

45
#>174 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 01:01AM

46
#>184 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 12:59AM

52
#>225 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 12:59AM

53
#>230 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 12:53AM

53
#>230 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 12:55AM

54
#>240 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 12:56AM

55
#>249 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 12:57AM

81
#>292 - Ravi S Sinha / @ambidextrousTx

12/29/2020 at 12:52AM