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

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

152 active golfers, 656 entries

Solutions by @justinhj:
34
#14 - justinhj / @justinhj

12/30/2020 at 08:00PM

34
#>14 - justinhj / @justinhj

12/30/2020 at 09:16PM

34
#>14 - justinhj / @justinhj

12/31/2020 at 02:18AM

35
#>44 - justinhj / @justinhj

12/30/2020 at 07:58PM

36
#>55 - justinhj / @justinhj

12/30/2020 at 07:55PM

37
#>58 - justinhj / @justinhj

12/30/2020 at 07:54PM

38
#>62 - justinhj / @justinhj

12/30/2020 at 07:53PM

40
#>67 - justinhj / @justinhj

12/30/2020 at 07:39PM

41
#>71 - justinhj / @justinhj

12/30/2020 at 07:28PM

41
#>71 - justinhj / @justinhj

12/30/2020 at 07:38PM

42
#>74 - justinhj / @justinhj

12/30/2020 at 07:33PM

43
#>79 - justinhj / @justinhj

12/30/2020 at 07:02PM

44
#>84 - justinhj / @justinhj

12/30/2020 at 07:34PM

46
#>96 - justinhj / @justinhj

12/30/2020 at 06:42PM

46
#>96 - justinhj / @justinhj

12/30/2020 at 06:56PM

46
#>96 - justinhj / @justinhj

12/30/2020 at 07:44PM

47
#>101 - justinhj / @justinhj

12/30/2020 at 06:13PM

48
#>108 - justinhj / @justinhj

12/29/2020 at 11:03PM

49
#>110 - justinhj / @justinhj

12/29/2020 at 11:01PM

50
#>110 - justinhj / @justinhj

12/30/2020 at 06:40PM

51
#>111 - justinhj / @justinhj

12/30/2020 at 06:39PM

57
#>128 - justinhj / @justinhj

12/29/2020 at 10:53PM

59
#>130 - justinhj / @justinhj

12/30/2020 at 06:27PM

63
#>136 - justinhj / @justinhj

12/29/2020 at 10:59PM

64
#>137 - justinhj / @justinhj

12/29/2020 at 08:12PM

67
#>138 - justinhj / @justinhj

12/29/2020 at 08:08PM

87
#>145 - justinhj / @justinhj

12/30/2020 at 06:22PM

103
#>145 - justinhj / @justinhj

12/29/2020 at 10:51PM

302
#>152 - justinhj / @justinhj

12/29/2020 at 08:05PM