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

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

299 active golfers, 1791 entries

Solutions by @JGEsteves89:
17
#49 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:58PM

18
#>59 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:58PM

19
#>76 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:57PM

20
#>85 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:56PM

21
#>93 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:54PM

22
#>101 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:53PM

23
#>113 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:52PM

24
#>129 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:50PM

26
#>153 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:20PM

26
#>153 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:46PM

30
#>185 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:15PM

30
#>185 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:18PM

32
#>202 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:09PM

43
#>256 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 09:02PM

67
#>277 - Eng. José Esteves / @JGEsteves89

02/15/2025 at 08:58PM