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

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

205 active golfers, 1298 entries

Solutions by @ARezaK:
14
#10 - ARK / @ARezaK

10/28/2024 at 10:42PM

14
#>10 - ARK / @ARezaK

10/28/2024 at 10:42PM

15
#>13 - ARK / @ARezaK

10/28/2024 at 10:40PM

15
#>13 - ARK / @ARezaK

10/28/2024 at 10:42PM

16
#>29 - ARK / @ARezaK

10/28/2024 at 10:38PM

17
#>31 - ARK / @ARezaK

10/28/2024 at 10:36PM

17
#>31 - ARK / @ARezaK

10/28/2024 at 10:40PM

18
#>40 - ARK / @ARezaK

10/28/2024 at 10:35PM

19
#>58 - ARK / @ARezaK

10/28/2024 at 10:29PM

20
#>65 - ARK / @ARezaK

10/28/2024 at 10:24PM

20
#>65 - ARK / @ARezaK

10/28/2024 at 10:25PM

20
#>65 - ARK / @ARezaK

10/28/2024 at 10:38PM

21
#>74 - ARK / @ARezaK

10/28/2024 at 10:23PM

21
#>74 - ARK / @ARezaK

10/28/2024 at 10:24PM

22
#>77 - ARK / @ARezaK

10/28/2024 at 10:22PM

22
#>77 - ARK / @ARezaK

10/28/2024 at 10:23PM

23
#>87 - ARK / @ARezaK

10/28/2024 at 10:20PM

23
#>87 - ARK / @ARezaK

10/28/2024 at 10:22PM

24
#>99 - ARK / @ARezaK

10/28/2024 at 10:20PM

25
#>105 - ARK / @ARezaK

10/28/2024 at 10:19PM

26
#>114 - ARK / @ARezaK

10/28/2024 at 10:14PM

29
#>131 - ARK / @ARezaK

10/28/2024 at 10:29PM

30
#>135 - ARK / @ARezaK

10/28/2024 at 10:13PM

30
#>135 - ARK / @ARezaK

10/28/2024 at 10:33PM

31
#>138 - ARK / @ARezaK

10/28/2024 at 10:11PM

32
#>147 - ARK / @ARezaK

10/28/2024 at 10:37PM

39
#>168 - ARK / @ARezaK

10/28/2024 at 10:09PM

39
#>168 - ARK / @ARezaK

10/28/2024 at 10:17PM

41
#>174 - ARK / @ARezaK

10/28/2024 at 10:09PM

44
#>180 - ARK / @ARezaK

10/28/2024 at 10:08PM

44
#>180 - ARK / @ARezaK

10/28/2024 at 10:19PM

58
#>187 - ARK / @ARezaK

10/28/2024 at 10:07PM