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

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

318 active golfers, 1386 entries

Solutions by @frrfourmi:
37
#113 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 02:47PM

38
#>116 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 02:40PM

41
#>137 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 02:34PM

42
#>148 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 11:24AM

44
#>178 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 11:00AM

45
#>187 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 10:42AM

46
#>195 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 01:45AM

47
#>206 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 01:59AM

51
#>231 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 01:32AM

66
#>289 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 01:41AM

71
#>300 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 01:12AM

101
#>307 - 1 des frr fourmis / @frrfourmi

06/17/2023 at 01:20AM