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

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

271 active golfers, 1631 entries

Solutions by @Berel94:
14
#17 - Berel94 / @Berel94

10/20/2025 at 08:12PM

15
#>25 - Berel94 / @Berel94

10/20/2025 at 07:51PM

15
#>25 - Berel94 / @Berel94

10/20/2025 at 08:03PM

16
#>39 - Berel94 / @Berel94

10/20/2025 at 07:45PM

16
#>39 - Berel94 / @Berel94

10/20/2025 at 07:50PM

17
#>46 - Berel94 / @Berel94

10/20/2025 at 07:43PM

18
#>54 - Berel94 / @Berel94

10/20/2025 at 07:42PM

19
#>71 - Berel94 / @Berel94

10/20/2025 at 07:32PM

20
#>79 - Berel94 / @Berel94

10/20/2025 at 07:14PM