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 9v00669b3ff1000000000303

Rearrange array to single level

The goal is to flatten the array into a single list and remove any empty elements.

Start file
[
    []  ,
    [''],
    ['0', '1', '2'],
    ['3', '4', '5'],
    ['6', '7'],
    ['8', '9'],
    ['']
]
End file
['', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '']

View Diff

1,9c1
< [
<     []  ,
<     [''],
<     ['0', '1', '2'],
<     ['3', '4', '5'],
<     ['6', '7'],
<     ['8', '9'],
<     ['']
< ]
---
> ['', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '']

Solutions by @Sobes76rus:

Unlock 11 remaining solutions by signing in and submitting your own entry
Created by: @maharba6

205 active golfers, 1298 entries

Solutions by @Sobes76rus:
18
#36 - Anton / @Sobes76rus

08/25/2024 at 06:08PM

19
#>54 - Anton / @Sobes76rus

08/25/2024 at 05:48PM

20
#>62 - Anton / @Sobes76rus

08/25/2024 at 05:44PM

23
#>83 - Anton / @Sobes76rus

08/25/2024 at 05:37PM

24
#>96 - Anton / @Sobes76rus

08/25/2024 at 05:36PM

26
#>111 - Anton / @Sobes76rus

08/25/2024 at 05:32PM

29
#>129 - Anton / @Sobes76rus

08/25/2024 at 05:27PM

31
#>136 - Anton / @Sobes76rus

08/25/2024 at 05:07PM

36
#>161 - Anton / @Sobes76rus

08/25/2024 at 04:54PM

39
#>168 - Anton / @Sobes76rus

08/25/2024 at 04:49PM

65
#>189 - Anton / @Sobes76rus

08/25/2024 at 04:47PM