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

235 active golfers, 1435 entries

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

09/04/2024 at 04:41PM

15
#>17 - Stephen Edwards / @sventi555

09/04/2024 at 04:39PM

16
#>32 - Stephen Edwards / @sventi555

09/04/2024 at 04:27PM

16
#>32 - Stephen Edwards / @sventi555

09/04/2024 at 04:37PM

18
#>44 - Stephen Edwards / @sventi555

09/04/2024 at 04:21PM

19
#>62 - Stephen Edwards / @sventi555

09/04/2024 at 04:21PM

20
#>67 - Stephen Edwards / @sventi555

09/04/2024 at 04:20PM

21
#>78 - Stephen Edwards / @sventi555

09/04/2024 at 04:20PM

22
#>81 - Stephen Edwards / @sventi555

09/04/2024 at 04:17PM

23
#>89 - Stephen Edwards / @sventi555

09/04/2024 at 04:16PM

24
#>103 - Stephen Edwards / @sventi555

09/04/2024 at 04:15PM

25
#>109 - Stephen Edwards / @sventi555

09/04/2024 at 04:11PM

26
#>123 - Stephen Edwards / @sventi555

09/04/2024 at 04:08PM

27
#>129 - Stephen Edwards / @sventi555

09/04/2024 at 04:05PM

33
#>165 - Stephen Edwards / @sventi555

09/04/2024 at 04:00PM