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

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

152 active golfers, 656 entries

Solutions by @torikatsu923:
34
#23 - Torikatsu / @torikatsu923

02/12/2021 at 05:26PM

35
#>48 - Torikatsu / @torikatsu923

02/12/2021 at 05:19PM

35
#>48 - Torikatsu / @torikatsu923

02/12/2021 at 05:24PM

36
#>55 - Torikatsu / @torikatsu923

02/12/2021 at 05:17PM

37
#>60 - Torikatsu / @torikatsu923

02/12/2021 at 05:13PM

37
#>60 - Torikatsu / @torikatsu923

02/12/2021 at 05:15PM

38
#>62 - Torikatsu / @torikatsu923

02/12/2021 at 05:18PM

39
#>64 - Torikatsu / @torikatsu923

02/12/2021 at 05:09PM

40
#>67 - Torikatsu / @torikatsu923

02/12/2021 at 05:07PM

41
#>71 - Torikatsu / @torikatsu923

02/12/2021 at 04:58PM

42
#>77 - Torikatsu / @torikatsu923

02/12/2021 at 05:02PM

42
#>77 - Torikatsu / @torikatsu923

02/12/2021 at 05:05PM

43
#>79 - Torikatsu / @torikatsu923

02/12/2021 at 04:55PM

44
#>89 - Torikatsu / @torikatsu923

02/12/2021 at 04:59PM

44
#>89 - Torikatsu / @torikatsu923

02/12/2021 at 05:00PM

46
#>97 - Torikatsu / @torikatsu923

02/12/2021 at 04:54PM

47
#>103 - Torikatsu / @torikatsu923

02/12/2021 at 04:58PM

52
#>113 - Torikatsu / @torikatsu923

02/12/2021 at 04:48PM

57
#>129 - Torikatsu / @torikatsu923

02/12/2021 at 04:20PM

60
#>133 - Torikatsu / @torikatsu923

02/12/2021 at 04:34PM

60
#>133 - Torikatsu / @torikatsu923

02/12/2021 at 04:53PM

62
#>135 - Torikatsu / @torikatsu923

02/12/2021 at 04:32PM

68
#>139 - Torikatsu / @torikatsu923

02/12/2021 at 04:30PM

75
#>145 - Torikatsu / @torikatsu923

02/12/2021 at 04:17PM

80
#>145 - Torikatsu / @torikatsu923

02/12/2021 at 04:14PM