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

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

117 active golfers, 507 entries

Solutions by @pikjes2:
34
#32 - pikjes / @pikjes2

03/20/2021 at 08:54PM

35
#>42 - pikjes / @pikjes2

03/20/2021 at 08:51PM

36
#>44 - pikjes / @pikjes2

03/20/2021 at 08:50PM

37
#>49 - pikjes / @pikjes2

03/20/2021 at 07:41PM

37
#>49 - pikjes / @pikjes2

03/20/2021 at 07:42PM

38
#>49 - pikjes / @pikjes2

03/20/2021 at 07:40PM

40
#>57 - pikjes / @pikjes2

03/20/2021 at 07:39PM

42
#>64 - pikjes / @pikjes2

03/20/2021 at 07:37PM

43
#>65 - pikjes / @pikjes2

03/20/2021 at 07:33PM

46
#>78 - pikjes / @pikjes2

03/20/2021 at 07:27PM

48
#>85 - pikjes / @pikjes2

03/20/2021 at 07:25PM

50
#>85 - pikjes / @pikjes2

03/20/2021 at 07:24PM

53
#>92 - pikjes / @pikjes2

03/20/2021 at 07:22PM

54
#>96 - pikjes / @pikjes2

03/20/2021 at 07:20PM

57
#>101 - pikjes / @pikjes2

03/20/2021 at 07:19PM