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

224 active golfers, 994 entries

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

02/12/2021 at 05:26PM

35
#>64 - Torikatsu / @torikatsu923

02/12/2021 at 05:19PM

35
#>64 - Torikatsu / @torikatsu923

02/12/2021 at 05:24PM

36
#>77 - Torikatsu / @torikatsu923

02/12/2021 at 05:17PM

37
#>85 - Torikatsu / @torikatsu923

02/12/2021 at 05:13PM

37
#>85 - Torikatsu / @torikatsu923

02/12/2021 at 05:15PM

38
#>89 - Torikatsu / @torikatsu923

02/12/2021 at 05:18PM

39
#>91 - Torikatsu / @torikatsu923

02/12/2021 at 05:09PM

40
#>95 - Torikatsu / @torikatsu923

02/12/2021 at 05:07PM

41
#>100 - Torikatsu / @torikatsu923

02/12/2021 at 04:58PM

42
#>107 - Torikatsu / @torikatsu923

02/12/2021 at 05:02PM

42
#>107 - Torikatsu / @torikatsu923

02/12/2021 at 05:05PM

43
#>111 - Torikatsu / @torikatsu923

02/12/2021 at 04:55PM

44
#>125 - Torikatsu / @torikatsu923

02/12/2021 at 04:59PM

44
#>125 - Torikatsu / @torikatsu923

02/12/2021 at 05:00PM

46
#>141 - Torikatsu / @torikatsu923

02/12/2021 at 04:54PM

47
#>148 - Torikatsu / @torikatsu923

02/12/2021 at 04:58PM

52
#>165 - Torikatsu / @torikatsu923

02/12/2021 at 04:48PM

57
#>187 - Torikatsu / @torikatsu923

02/12/2021 at 04:20PM

60
#>195 - Torikatsu / @torikatsu923

02/12/2021 at 04:34PM

60
#>195 - Torikatsu / @torikatsu923

02/12/2021 at 04:53PM

62
#>198 - Torikatsu / @torikatsu923

02/12/2021 at 04:32PM

68
#>203 - Torikatsu / @torikatsu923

02/12/2021 at 04:30PM

75
#>211 - Torikatsu / @torikatsu923

02/12/2021 at 04:17PM

80
#>212 - Torikatsu / @torikatsu923

02/12/2021 at 04:14PM