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

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

205 active golfers, 1298 entries

Solutions by @eksoderstrom:
19
#52 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:22PM

20
#>60 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:22PM

21
#>70 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:19PM

22
#>75 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:18PM

23
#>82 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:16PM

24
#>93 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:15PM

25
#>101 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:05PM

25
#>101 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:07PM

25
#>101 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:13PM

26
#>110 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:04PM

30
#>133 - Eric Söderström / @eksoderstrom

08/12/2024 at 04:01PM

33
#>148 - Eric Söderström / @eksoderstrom

08/12/2024 at 03:47PM

43
#>177 - Eric Söderström / @eksoderstrom

08/12/2024 at 03:43PM