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

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

262 active golfers, 1570 entries

Solutions by @MatFriend:
14
#6 - MatFriend / @MatFriend

09/24/2024 at 05:10AM

15
#>18 - MatFriend / @MatFriend

09/24/2024 at 05:08AM

16
#>36 - MatFriend / @MatFriend

09/24/2024 at 05:07AM

17
#>38 - MatFriend / @MatFriend

09/24/2024 at 05:01AM

17
#>38 - MatFriend / @MatFriend

09/24/2024 at 05:03AM

18
#>49 - MatFriend / @MatFriend

09/24/2024 at 04:59AM

19
#>67 - MatFriend / @MatFriend

09/24/2024 at 04:58AM

20
#>74 - MatFriend / @MatFriend

09/24/2024 at 04:57AM

21
#>84 - MatFriend / @MatFriend

09/24/2024 at 04:54AM

22
#>89 - MatFriend / @MatFriend

09/24/2024 at 04:52AM

23
#>97 - MatFriend / @MatFriend

09/24/2024 at 04:51AM

24
#>112 - MatFriend / @MatFriend

09/24/2024 at 04:49AM

27
#>143 - MatFriend / @MatFriend

09/24/2024 at 04:41AM

37
#>200 - MatFriend / @MatFriend

09/24/2024 at 04:10AM

43
#>219 - MatFriend / @MatFriend

09/24/2024 at 04:05AM

44
#>224 - MatFriend / @MatFriend

09/24/2024 at 03:59AM