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

79 active golfers, 325 entries

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

02/12/2021 at 05:26PM

35
#>30 - Torikatsu / @torikatsu923

02/12/2021 at 05:19PM

35
#>30 - Torikatsu / @torikatsu923

02/12/2021 at 05:24PM

36
#>31 - Torikatsu / @torikatsu923

02/12/2021 at 05:17PM

37
#>35 - Torikatsu / @torikatsu923

02/12/2021 at 05:13PM

37
#>35 - Torikatsu / @torikatsu923

02/12/2021 at 05:15PM

38
#>35 - Torikatsu / @torikatsu923

02/12/2021 at 05:18PM

39
#>37 - Torikatsu / @torikatsu923

02/12/2021 at 05:09PM

40
#>38 - Torikatsu / @torikatsu923

02/12/2021 at 05:07PM

41
#>39 - Torikatsu / @torikatsu923

02/12/2021 at 04:58PM

42
#>42 - Torikatsu / @torikatsu923

02/12/2021 at 05:02PM

42
#>42 - Torikatsu / @torikatsu923

02/12/2021 at 05:05PM

43
#>42 - Torikatsu / @torikatsu923

02/12/2021 at 04:55PM

44
#>48 - Torikatsu / @torikatsu923

02/12/2021 at 04:59PM

44
#>48 - Torikatsu / @torikatsu923

02/12/2021 at 05:00PM

46
#>50 - Torikatsu / @torikatsu923

02/12/2021 at 04:54PM

47
#>55 - Torikatsu / @torikatsu923

02/12/2021 at 04:58PM

52
#>60 - Torikatsu / @torikatsu923

02/12/2021 at 04:48PM

57
#>68 - Torikatsu / @torikatsu923

02/12/2021 at 04:20PM

60
#>68 - Torikatsu / @torikatsu923

02/12/2021 at 04:34PM

60
#>68 - Torikatsu / @torikatsu923

02/12/2021 at 04:53PM

62
#>68 - Torikatsu / @torikatsu923

02/12/2021 at 04:32PM

68
#>70 - Torikatsu / @torikatsu923

02/12/2021 at 04:30PM

75
#>73 - Torikatsu / @torikatsu923

02/12/2021 at 04:17PM

80
#>73 - Torikatsu / @torikatsu923

02/12/2021 at 04:14PM