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

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

207 active golfers, 1303 entries

Solutions by @mtklar:
14
#7 - mtklar / @mtklar

10/19/2024 at 09:23AM

15
#>13 - mtklar / @mtklar

10/19/2024 at 09:21AM

16
#>29 - mtklar / @mtklar

10/19/2024 at 09:20AM

17
#>31 - mtklar / @mtklar

10/19/2024 at 09:10AM

18
#>40 - mtklar / @mtklar

10/19/2024 at 09:09AM

19
#>58 - mtklar / @mtklar

10/19/2024 at 09:08AM

20
#>64 - mtklar / @mtklar

10/19/2024 at 09:07AM

21
#>74 - mtklar / @mtklar

10/19/2024 at 09:06AM

22
#>77 - mtklar / @mtklar

10/19/2024 at 09:05AM

23
#>87 - mtklar / @mtklar

10/19/2024 at 09:04AM

24
#>98 - mtklar / @mtklar

10/19/2024 at 09:02AM

25
#>104 - mtklar / @mtklar

10/19/2024 at 08:54AM

27
#>122 - mtklar / @mtklar

10/19/2024 at 08:49AM

29
#>132 - mtklar / @mtklar

10/19/2024 at 08:56AM

30
#>136 - mtklar / @mtklar

10/19/2024 at 08:47AM

31
#>139 - mtklar / @mtklar

10/19/2024 at 08:36AM

33
#>152 - mtklar / @mtklar

10/19/2024 at 08:43AM

35
#>162 - mtklar / @mtklar

10/19/2024 at 08:35AM

42
#>177 - mtklar / @mtklar

10/19/2024 at 08:31AM

44
#>182 - mtklar / @mtklar

10/19/2024 at 08:20AM

46
#>182 - mtklar / @mtklar

10/19/2024 at 08:15AM

88
#>193 - mtklar / @mtklar

10/19/2024 at 08:08AM

102
#>196 - mtklar / @mtklar

10/19/2024 at 07:48AM