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

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

205 active golfers, 1298 entries

Solutions by @sventi555:
14
#4 - Stephen Edwards / @sventi555

09/04/2024 at 04:41PM

15
#>13 - Stephen Edwards / @sventi555

09/04/2024 at 04:39PM

16
#>29 - Stephen Edwards / @sventi555

09/04/2024 at 04:27PM

16
#>29 - Stephen Edwards / @sventi555

09/04/2024 at 04:37PM

18
#>39 - Stephen Edwards / @sventi555

09/04/2024 at 04:21PM

19
#>57 - Stephen Edwards / @sventi555

09/04/2024 at 04:21PM

20
#>62 - Stephen Edwards / @sventi555

09/04/2024 at 04:20PM

21
#>73 - Stephen Edwards / @sventi555

09/04/2024 at 04:20PM

22
#>76 - Stephen Edwards / @sventi555

09/04/2024 at 04:17PM

23
#>84 - Stephen Edwards / @sventi555

09/04/2024 at 04:16PM

24
#>97 - Stephen Edwards / @sventi555

09/04/2024 at 04:15PM

25
#>102 - Stephen Edwards / @sventi555

09/04/2024 at 04:11PM

26
#>113 - Stephen Edwards / @sventi555

09/04/2024 at 04:08PM

27
#>119 - Stephen Edwards / @sventi555

09/04/2024 at 04:05PM

33
#>151 - Stephen Edwards / @sventi555

09/04/2024 at 04:00PM