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

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

152 active golfers, 656 entries

Solutions by @NicolasPagny:
34
#16 - Nicolas Pagny / @NicolasPagny

01/06/2021 at 04:53PM

35
#>45 - Nicolas Pagny / @NicolasPagny

01/06/2021 at 04:51PM

36
#>55 - Nicolas Pagny / @NicolasPagny

01/06/2021 at 04:49PM

37
#>58 - Nicolas Pagny / @NicolasPagny

01/06/2021 at 04:47PM

40
#>67 - Nicolas Pagny / @NicolasPagny

01/06/2021 at 04:44PM

41
#>71 - Nicolas Pagny / @NicolasPagny

01/06/2021 at 04:41PM

43
#>79 - Nicolas Pagny / @NicolasPagny

01/05/2021 at 03:44PM

43
#>79 - Nicolas Pagny / @NicolasPagny

01/05/2021 at 03:49PM

45
#>92 - Nicolas Pagny / @NicolasPagny

01/05/2021 at 03:37PM

54
#>121 - Nicolas Pagny / @NicolasPagny

01/05/2021 at 03:34PM