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

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

144 active golfers, 602 entries

Solutions by @nickandbro:
13
#12 - nickGPT / @nickandbro

08/20/2024 at 08:00AM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 01:18PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 01:32PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 01:38PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 01:52PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 05:52PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 05:54PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 05:58PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 05:59PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 06:07PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 06:09PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 06:14PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 06:16PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 07:18PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 07:20PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 07:26PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 07:31PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 07:40PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 07:44PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 07:54PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 07:56PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 07:59PM

13
#>12 - nickGPT / @nickandbro

08/20/2024 at 08:01PM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 03:10AM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 03:26AM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 03:39AM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 04:37AM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 05:21AM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 05:24AM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 05:44AM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 05:47AM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 05:56AM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 03:39PM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 03:54PM

13
#>12 - nickGPT / @nickandbro

08/21/2024 at 07:58PM

13
#>12 - nickGPT / @nickandbro

08/22/2024 at 02:39AM

13
#>12 - nickGPT / @nickandbro

08/22/2024 at 02:59AM

13
#>13 - nickGPT / @nickandbro

08/23/2024 at 03:18AM

13
#>13 - nickGPT / @nickandbro

08/23/2024 at 03:23AM

13
#>13 - nickGPT / @nickandbro

08/23/2024 at 05:13AM

13
#>14 - nickGPT / @nickandbro

08/25/2024 at 06:43AM

13
#>15 - nickGPT / @nickandbro

08/26/2024 at 04:50PM

13
#>15 - nickGPT / @nickandbro

08/26/2024 at 04:57PM

13
#>15 - nickGPT / @nickandbro

08/26/2024 at 07:08PM

14
#>24 - nickGPT / @nickandbro

08/20/2024 at 07:56AM

14
#>24 - nickGPT / @nickandbro

08/20/2024 at 11:01PM

14
#>24 - nickGPT / @nickandbro

08/20/2024 at 11:04PM

14
#>24 - nickGPT / @nickandbro

08/20/2024 at 11:06PM

14
#>24 - nickGPT / @nickandbro

08/20/2024 at 11:18PM

14
#>24 - nickGPT / @nickandbro

08/20/2024 at 11:22PM

14
#>24 - nickGPT / @nickandbro

08/20/2024 at 11:26PM

14
#>24 - nickGPT / @nickandbro

08/20/2024 at 11:30PM

14
#>24 - nickGPT / @nickandbro

08/21/2024 at 12:01AM

14
#>24 - nickGPT / @nickandbro

08/21/2024 at 12:04AM

14
#>24 - nickGPT / @nickandbro

08/21/2024 at 12:09AM

14
#>24 - nickGPT / @nickandbro

08/21/2024 at 12:37AM

14
#>24 - nickGPT / @nickandbro

08/21/2024 at 12:42AM

14
#>24 - nickGPT / @nickandbro

08/21/2024 at 02:53AM

14
#>24 - nickGPT / @nickandbro

08/21/2024 at 02:57AM

14
#>24 - nickGPT / @nickandbro

08/21/2024 at 02:59AM

15
#>35 - nickGPT / @nickandbro

08/20/2024 at 07:43AM

16
#>42 - nickGPT / @nickandbro

08/20/2024 at 07:42AM

17
#>46 - nickGPT / @nickandbro

08/20/2024 at 07:42AM

19
#>54 - nickGPT / @nickandbro

08/20/2024 at 07:38AM

20
#>70 - nickGPT / @nickandbro

08/20/2024 at 07:38AM

21
#>83 - nickGPT / @nickandbro

08/20/2024 at 07:38AM

22
#>92 - nickGPT / @nickandbro

08/20/2024 at 07:37AM

23
#>95 - nickGPT / @nickandbro

08/20/2024 at 07:37AM

25
#>106 - nickGPT / @nickandbro

08/20/2024 at 07:31AM

26
#>113 - nickGPT / @nickandbro

08/20/2024 at 07:31AM

27
#>117 - nickGPT / @nickandbro

08/20/2024 at 07:31AM

29
#>123 - nickGPT / @nickandbro

08/20/2024 at 07:15AM

30
#>125 - nickGPT / @nickandbro

08/20/2024 at 07:14AM

32
#>128 - nickGPT / @nickandbro

08/20/2024 at 07:13AM

35
#>132 - nickGPT / @nickandbro

08/20/2024 at 06:56AM

50
#>133 - nickGPT / @nickandbro

08/20/2024 at 06:55AM

52
#>135 - nickGPT / @nickandbro

08/20/2024 at 06:55AM

56
#>137 - nickGPT / @nickandbro

08/20/2024 at 06:55AM

57
#>138 - nickGPT / @nickandbro

08/20/2024 at 06:55AM

71
#>139 - nickGPT / @nickandbro

08/20/2024 at 06:54AM

72
#>140 - nickGPT / @nickandbro

08/20/2024 at 06:54AM

80
#>141 - nickGPT / @nickandbro

08/20/2024 at 06:54AM

124
#>141 - nickGPT / @nickandbro

08/20/2024 at 06:54AM

152
#>143 - nickGPT / @nickandbro

08/20/2024 at 06:50AM

225
#>143 - nickGPT / @nickandbro

08/20/2024 at 05:52AM