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 9v006694339a0000000002e2

Rearrange array to one line

Rearrange the array content on only one line, and remove trailing commas

Start file
const data = [
  {
    goal: 400,
  },
  {
    goal: 300,
  },
  {
    goal: 200,
  },
  {
    goal: 300,
  },
  {
    goal: 200,
  },
  {
    goal: 278,
  },
  {
    goal: 189,
  },
  {
    goal: 239,
  },
  {
    goal: 300,
  },
  {
    goal: 200,
  },
  {
    goal: 278,
  },
  {
    goal: 189,
  },
  {
    goal: 349,
  },
]
End file
const data = [
  { goal: 400 }, { goal: 300 }, { goal: 200 }, { goal: 300 }, { goal: 200 }, { goal: 278 }, { goal: 189 }, { goal: 239 }, { goal: 300 }, { goal: 200 }, { goal: 278 }, { goal: 189 }, { goal: 349 }
]

View Diff

2,40c2
<   {
<     goal: 400,
<   },
<   {
<     goal: 300,
<   },
<   {
<     goal: 200,
<   },
<   {
<     goal: 300,
<   },
<   {
<     goal: 200,
<   },
<   {
<     goal: 278,
<   },
<   {
<     goal: 189,
<   },
<   {
<     goal: 239,
<   },
<   {
<     goal: 300,
<   },
<   {
<     goal: 200,
<   },
<   {
<     goal: 278,
<   },
<   {
<     goal: 189,
<   },
<   {
<     goal: 349,
<   },
---
>   { goal: 400 }, { goal: 300 }, { goal: 200 }, { goal: 300 }, { goal: 200 }, { goal: 278 }, { goal: 189 }, { goal: 239 }, { goal: 300 }, { goal: 200 }, { goal: 278 }, { goal: 189 }, { goal: 349 }

Solutions by @elforeee:

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

145 active golfers, 604 entries

Solutions by @elforeee:
14
#29 - elforeee / @elforeee

09/30/2024 at 11:22AM

15
#>37 - elforeee / @elforeee

09/30/2024 at 11:20AM

16
#>43 - elforeee / @elforeee

09/30/2024 at 11:17AM

17
#>46 - elforeee / @elforeee

09/30/2024 at 11:16AM

18
#>48 - elforeee / @elforeee

09/30/2024 at 11:14AM

19
#>58 - elforeee / @elforeee

09/30/2024 at 11:13AM

20
#>73 - elforeee / @elforeee

09/30/2024 at 11:11AM

22
#>95 - elforeee / @elforeee

09/30/2024 at 11:10AM

26
#>116 - elforeee / @elforeee

09/30/2024 at 10:57AM

28
#>123 - elforeee / @elforeee

09/30/2024 at 10:52AM

35
#>133 - elforeee / @elforeee

09/30/2024 at 10:37AM