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

118 active golfers, 509 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
#>36 - justinhj / @justinhj

12/30/2020 at 07:58PM

36
#>44 - justinhj / @justinhj

12/30/2020 at 07:55PM

37
#>46 - justinhj / @justinhj

12/30/2020 at 07:54PM

38
#>49 - justinhj / @justinhj

12/30/2020 at 07:53PM

40
#>55 - justinhj / @justinhj

12/30/2020 at 07:39PM

41
#>58 - justinhj / @justinhj

12/30/2020 at 07:28PM

41
#>58 - justinhj / @justinhj

12/30/2020 at 07:38PM

42
#>60 - justinhj / @justinhj

12/30/2020 at 07:33PM

43
#>64 - justinhj / @justinhj

12/30/2020 at 07:02PM

44
#>66 - justinhj / @justinhj

12/30/2020 at 07:34PM

46
#>76 - justinhj / @justinhj

12/30/2020 at 06:42PM

46
#>76 - justinhj / @justinhj

12/30/2020 at 06:56PM

46
#>76 - justinhj / @justinhj

12/30/2020 at 07:44PM

47
#>80 - justinhj / @justinhj

12/30/2020 at 06:13PM

48
#>84 - justinhj / @justinhj

12/29/2020 at 11:03PM

49
#>85 - justinhj / @justinhj

12/29/2020 at 11:01PM

50
#>85 - justinhj / @justinhj

12/30/2020 at 06:40PM

51
#>86 - justinhj / @justinhj

12/30/2020 at 06:39PM

57
#>100 - justinhj / @justinhj

12/29/2020 at 10:53PM

59
#>101 - justinhj / @justinhj

12/30/2020 at 06:27PM

63
#>103 - justinhj / @justinhj

12/29/2020 at 10:59PM

64
#>104 - justinhj / @justinhj

12/29/2020 at 08:12PM

67
#>105 - justinhj / @justinhj

12/29/2020 at 08:08PM

87
#>111 - justinhj / @justinhj

12/30/2020 at 06:22PM

103
#>111 - justinhj / @justinhj

12/29/2020 at 10:51PM

302
#>118 - justinhj / @justinhj

12/29/2020 at 08:05PM