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

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

205 active golfers, 1298 entries

Solutions by @rasputins:
14
#8 - rasputins / @rasputins

10/23/2024 at 02:28AM

15
#>13 - rasputins / @rasputins

10/22/2024 at 10:39PM

15
#>13 - rasputins / @rasputins

10/23/2024 at 02:27AM

16
#>29 - rasputins / @rasputins

10/22/2024 at 10:37PM

16
#>29 - rasputins / @rasputins

10/22/2024 at 10:38PM

17
#>31 - rasputins / @rasputins

10/22/2024 at 08:47PM

18
#>40 - rasputins / @rasputins

10/22/2024 at 08:39PM

19
#>58 - rasputins / @rasputins

10/22/2024 at 08:38PM

20
#>64 - rasputins / @rasputins

10/22/2024 at 08:37PM

21
#>74 - rasputins / @rasputins

10/22/2024 at 08:35PM

22
#>77 - rasputins / @rasputins

10/22/2024 at 08:29PM

23
#>87 - rasputins / @rasputins

10/22/2024 at 08:28PM

24
#>98 - rasputins / @rasputins

10/22/2024 at 05:44AM

25
#>105 - rasputins / @rasputins

10/22/2024 at 05:42AM

32
#>147 - rasputins / @rasputins

10/22/2024 at 05:41AM

35
#>161 - rasputins / @rasputins

10/22/2024 at 05:34AM

38
#>168 - rasputins / @rasputins

10/22/2024 at 05:31AM

44
#>180 - rasputins / @rasputins

10/22/2024 at 04:02AM

65
#>189 - rasputins / @rasputins

10/22/2024 at 03:59AM

90
#>191 - rasputins / @rasputins

10/22/2024 at 03:55AM

147
#>198 - rasputins / @rasputins

10/22/2024 at 03:52AM