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

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

205 active golfers, 1298 entries

Solutions by @KarimIbrahim:
16
#27 - Karim / @KarimIbrahim

08/21/2024 at 09:15PM

18
#>35 - Karim / @KarimIbrahim

08/21/2024 at 09:02PM

19
#>54 - Karim / @KarimIbrahim

08/21/2024 at 08:56PM

20
#>62 - Karim / @KarimIbrahim

08/21/2024 at 08:55PM

21
#>71 - Karim / @KarimIbrahim

08/21/2024 at 08:54PM

22
#>76 - Karim / @KarimIbrahim

08/21/2024 at 08:53PM

23
#>83 - Karim / @KarimIbrahim

08/21/2024 at 08:50PM

24
#>94 - Karim / @KarimIbrahim

08/21/2024 at 08:46PM

25
#>101 - Karim / @KarimIbrahim

08/21/2024 at 08:38PM

26
#>110 - Karim / @KarimIbrahim

08/21/2024 at 08:18PM

26
#>110 - Karim / @KarimIbrahim

08/21/2024 at 08:45PM

27
#>116 - Karim / @KarimIbrahim

08/21/2024 at 08:35PM

28
#>125 - Karim / @KarimIbrahim

08/21/2024 at 08:16PM

32
#>142 - Karim / @KarimIbrahim

08/21/2024 at 07:57PM

39
#>168 - Karim / @KarimIbrahim

08/21/2024 at 08:09PM