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

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

326 active golfers, 1410 entries

Solutions by @Victor_Phan:
35
#96 - Victor Phan / @Victor_Phan

08/31/2023 at 12:34AM

36
#>105 - Victor Phan / @Victor_Phan

08/31/2023 at 12:33AM

37
#>117 - Victor Phan / @Victor_Phan

08/31/2023 at 12:32AM

38
#>120 - Victor Phan / @Victor_Phan

08/31/2023 at 12:31AM

39
#>126 - Victor Phan / @Victor_Phan

08/31/2023 at 12:28AM

40
#>133 - Victor Phan / @Victor_Phan

08/31/2023 at 12:26AM

41
#>141 - Victor Phan / @Victor_Phan

08/31/2023 at 12:25AM

42
#>152 - Victor Phan / @Victor_Phan

08/31/2023 at 12:22AM

43
#>162 - Victor Phan / @Victor_Phan

08/31/2023 at 12:13AM

45
#>195 - Victor Phan / @Victor_Phan

08/31/2023 at 12:08AM

45
#>195 - Victor Phan / @Victor_Phan

08/31/2023 at 12:10AM

47
#>215 - Victor Phan / @Victor_Phan

08/31/2023 at 12:00AM

49
#>228 - Victor Phan / @Victor_Phan

08/30/2023 at 11:56PM

52
#>244 - Victor Phan / @Victor_Phan

08/30/2023 at 11:51PM

77
#>309 - Victor Phan / @Victor_Phan

08/30/2023 at 11:44PM