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

235 active golfers, 1435 entries

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

09/24/2024 at 05:10AM

15
#>17 - MatFriend / @MatFriend

09/24/2024 at 05:08AM

16
#>32 - MatFriend / @MatFriend

09/24/2024 at 05:07AM

17
#>34 - MatFriend / @MatFriend

09/24/2024 at 05:01AM

17
#>34 - MatFriend / @MatFriend

09/24/2024 at 05:03AM

18
#>44 - MatFriend / @MatFriend

09/24/2024 at 04:59AM

19
#>62 - MatFriend / @MatFriend

09/24/2024 at 04:58AM

20
#>69 - MatFriend / @MatFriend

09/24/2024 at 04:57AM

21
#>79 - MatFriend / @MatFriend

09/24/2024 at 04:54AM

22
#>82 - MatFriend / @MatFriend

09/24/2024 at 04:52AM

23
#>90 - MatFriend / @MatFriend

09/24/2024 at 04:51AM

24
#>103 - MatFriend / @MatFriend

09/24/2024 at 04:49AM

27
#>129 - MatFriend / @MatFriend

09/24/2024 at 04:41AM

37
#>182 - MatFriend / @MatFriend

09/24/2024 at 04:10AM

43
#>199 - MatFriend / @MatFriend

09/24/2024 at 04:05AM

44
#>202 - MatFriend / @MatFriend

09/24/2024 at 03:59AM