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

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

296 active golfers, 1768 entries

Solutions by @SeanJMorris:
34
#218 - Sean Morris / @SeanJMorris

02/02/2026 at 03:55PM

37
#>233 - Sean Morris / @SeanJMorris

02/02/2026 at 04:12AM

38
#>238 - Sean Morris / @SeanJMorris

02/02/2026 at 04:11AM

38
#>238 - Sean Morris / @SeanJMorris

02/03/2026 at 03:43PM

41
#>246 - Sean Morris / @SeanJMorris

02/03/2026 at 03:38PM

44
#>256 - Sean Morris / @SeanJMorris

02/02/2026 at 04:11AM

44
#>256 - Sean Morris / @SeanJMorris

02/03/2026 at 03:20PM

44
#>256 - Sean Morris / @SeanJMorris

02/03/2026 at 03:40PM

48
#>257 - Sean Morris / @SeanJMorris

02/03/2026 at 03:42PM

64
#>271 - Sean Morris / @SeanJMorris

02/03/2026 at 03:39PM

73
#>275 - Sean Morris / @SeanJMorris

02/03/2026 at 03:41PM