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

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

271 active golfers, 1631 entries

Solutions by @alythobani:
14
#18 - Aly Thobani / @alythobani

11/24/2025 at 05:53PM

15
#>25 - Aly Thobani / @alythobani

11/24/2025 at 05:44PM

16
#>39 - Aly Thobani / @alythobani

11/24/2025 at 05:44PM

17
#>46 - Aly Thobani / @alythobani

11/24/2025 at 05:43PM

18
#>54 - Aly Thobani / @alythobani

11/24/2025 at 05:38PM

18
#>54 - Aly Thobani / @alythobani

11/24/2025 at 05:42PM

19
#>71 - Aly Thobani / @alythobani

11/24/2025 at 05:38PM

20
#>79 - Aly Thobani / @alythobani

11/24/2025 at 05:37PM

21
#>89 - Aly Thobani / @alythobani

11/24/2025 at 06:24AM

21
#>89 - Aly Thobani / @alythobani

11/24/2025 at 05:35PM

23
#>107 - Aly Thobani / @alythobani

11/24/2025 at 05:25PM