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

53 active golfers, 227 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
#>22 - justinhj / @justinhj

12/30/2020 at 07:58PM

36
#>25 - justinhj / @justinhj

12/30/2020 at 07:55PM

37
#>27 - justinhj / @justinhj

12/30/2020 at 07:54PM

38
#>28 - justinhj / @justinhj

12/30/2020 at 07:53PM

40
#>29 - justinhj / @justinhj

12/30/2020 at 07:39PM

41
#>30 - justinhj / @justinhj

12/30/2020 at 07:28PM

41
#>30 - justinhj / @justinhj

12/30/2020 at 07:38PM

42
#>30 - justinhj / @justinhj

12/30/2020 at 07:33PM

43
#>31 - justinhj / @justinhj

12/30/2020 at 07:02PM

44
#>32 - justinhj / @justinhj

12/30/2020 at 07:34PM

46
#>35 - justinhj / @justinhj

12/30/2020 at 06:42PM

46
#>35 - justinhj / @justinhj

12/30/2020 at 06:56PM

46
#>35 - justinhj / @justinhj

12/30/2020 at 07:44PM

47
#>37 - justinhj / @justinhj

12/30/2020 at 06:13PM

48
#>41 - justinhj / @justinhj

12/29/2020 at 11:03PM

49
#>42 - justinhj / @justinhj

12/29/2020 at 11:01PM

50
#>43 - justinhj / @justinhj

12/30/2020 at 06:40PM

51
#>44 - justinhj / @justinhj

12/30/2020 at 06:39PM

57
#>46 - justinhj / @justinhj

12/29/2020 at 10:53PM

59
#>47 - justinhj / @justinhj

12/30/2020 at 06:27PM

63
#>48 - justinhj / @justinhj

12/29/2020 at 10:59PM

64
#>48 - justinhj / @justinhj

12/29/2020 at 08:12PM

67
#>49 - justinhj / @justinhj

12/29/2020 at 08:08PM

87
#>50 - justinhj / @justinhj

12/30/2020 at 06:22PM

103
#>50 - justinhj / @justinhj

12/29/2020 at 10:51PM

302
#>53 - justinhj / @justinhj

12/29/2020 at 08:05PM