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

239 active golfers, 1461 entries

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

08/25/2024 at 06:08PM

19
#>60 - Anton / @Sobes76rus

08/25/2024 at 05:48PM

20
#>68 - Anton / @Sobes76rus

08/25/2024 at 05:44PM

23
#>90 - Anton / @Sobes76rus

08/25/2024 at 05:37PM

24
#>104 - Anton / @Sobes76rus

08/25/2024 at 05:36PM

26
#>124 - Anton / @Sobes76rus

08/25/2024 at 05:32PM

29
#>144 - Anton / @Sobes76rus

08/25/2024 at 05:27PM

31
#>152 - Anton / @Sobes76rus

08/25/2024 at 05:07PM

36
#>180 - Anton / @Sobes76rus

08/25/2024 at 04:54PM

39
#>189 - Anton / @Sobes76rus

08/25/2024 at 04:49PM

65
#>219 - Anton / @Sobes76rus

08/25/2024 at 04:47PM