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

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

205 active golfers, 889 entries

Solutions by @Chloronite:
13
#36 - Chloronite / @Chloronite

07/15/2026 at 03:10AM

14
#>51 - Chloronite / @Chloronite

07/15/2026 at 03:03AM

15
#>60 - Chloronite / @Chloronite

07/15/2026 at 02:59AM

16
#>72 - Chloronite / @Chloronite

07/15/2026 at 02:56AM

17
#>77 - Chloronite / @Chloronite

07/15/2026 at 02:53AM

18
#>81 - Chloronite / @Chloronite

07/15/2026 at 02:44AM

19
#>92 - Chloronite / @Chloronite

07/15/2026 at 02:41AM

20
#>111 - Chloronite / @Chloronite

07/15/2026 at 02:33AM

21
#>127 - Chloronite / @Chloronite

07/15/2026 at 02:31AM

42
#>182 - Chloronite / @Chloronite

07/15/2026 at 02:26AM

55
#>190 - Chloronite / @Chloronite

07/15/2026 at 02:21AM

331
#>205 - Chloronite / @Chloronite

07/15/2026 at 02:19AM