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

224 active golfers, 994 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
#>60 - justinhj / @justinhj

12/30/2020 at 07:58PM

36
#>77 - justinhj / @justinhj

12/30/2020 at 07:55PM

37
#>83 - justinhj / @justinhj

12/30/2020 at 07:54PM

38
#>89 - justinhj / @justinhj

12/30/2020 at 07:53PM

40
#>95 - justinhj / @justinhj

12/30/2020 at 07:39PM

41
#>100 - justinhj / @justinhj

12/30/2020 at 07:28PM

41
#>100 - justinhj / @justinhj

12/30/2020 at 07:38PM

42
#>104 - justinhj / @justinhj

12/30/2020 at 07:33PM

43
#>111 - justinhj / @justinhj

12/30/2020 at 07:02PM

44
#>120 - justinhj / @justinhj

12/30/2020 at 07:34PM

46
#>140 - justinhj / @justinhj

12/30/2020 at 06:42PM

46
#>140 - justinhj / @justinhj

12/30/2020 at 06:56PM

46
#>140 - justinhj / @justinhj

12/30/2020 at 07:44PM

47
#>146 - justinhj / @justinhj

12/30/2020 at 06:13PM

48
#>154 - justinhj / @justinhj

12/29/2020 at 11:03PM

49
#>158 - justinhj / @justinhj

12/29/2020 at 11:01PM

50
#>160 - justinhj / @justinhj

12/30/2020 at 06:40PM

51
#>162 - justinhj / @justinhj

12/30/2020 at 06:39PM

57
#>186 - justinhj / @justinhj

12/29/2020 at 10:53PM

59
#>192 - justinhj / @justinhj

12/30/2020 at 06:27PM

63
#>200 - justinhj / @justinhj

12/29/2020 at 10:59PM

64
#>201 - justinhj / @justinhj

12/29/2020 at 08:12PM

67
#>202 - justinhj / @justinhj

12/29/2020 at 08:08PM

87
#>213 - justinhj / @justinhj

12/30/2020 at 06:22PM

103
#>214 - justinhj / @justinhj

12/29/2020 at 10:51PM

302
#>224 - justinhj / @justinhj

12/29/2020 at 08:05PM