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

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

145 active golfers, 604 entries

Solutions by @insomnight:
13
#19 - got_windy / @insomnight

10/24/2024 at 06:35AM

14
#>30 - got_windy / @insomnight

10/24/2024 at 06:34AM

15
#>37 - got_windy / @insomnight

10/24/2024 at 06:31AM

16
#>44 - got_windy / @insomnight

10/24/2024 at 06:28AM

17
#>46 - got_windy / @insomnight

10/24/2024 at 06:27AM

18
#>49 - got_windy / @insomnight

10/24/2024 at 06:24AM

19
#>59 - got_windy / @insomnight

10/24/2024 at 06:23AM

20
#>73 - got_windy / @insomnight

10/24/2024 at 06:22AM

21
#>88 - got_windy / @insomnight

10/24/2024 at 06:20AM

22
#>95 - got_windy / @insomnight

10/24/2024 at 06:19AM

23
#>98 - got_windy / @insomnight

10/24/2024 at 06:00AM