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 5d7259d2c0248a000c157f9f

Add string initializers to an enum

Change Typescript enum so that it has string initializers.

Start file
const enum TestkitType {
  vanilla,
  unidriver,
  protractor,
  puppeteer,
  unknown,
}
End file
const enum TestkitType {
  vanilla = 'VANILLA',
  unidriver = 'UNIDRIVER',
  protractor = 'PROTRACTOR',
  puppeteer = 'PUPPETEER',
  unknown = 'UNKNOWN',
}

View Diff

2,6c2,6
<   vanilla,
<   unidriver,
<   protractor,
<   puppeteer,
<   unknown,
---
>   vanilla = 'VANILLA',
>   unidriver = 'UNIDRIVER',
>   protractor = 'PROTRACTOR',
>   puppeteer = 'PUPPETEER',
>   unknown = 'UNKNOWN',

Solutions by @k_nhoui:

Unlock 6 remaining solutions by signing in and submitting your own entry
Created by: @argshook

254 active golfers, 862 entries

Solutions by @k_nhoui:
32
#239 - Khamnhoui-Boulom / @k_nhoui

09/16/2019 at 11:47AM

35
#>243 - Khamnhoui-Boulom / @k_nhoui

09/16/2019 at 09:41AM

86
#>250 - Khamnhoui-Boulom / @k_nhoui

09/16/2019 at 09:37AM

96
#>251 - Khamnhoui-Boulom / @k_nhoui

09/16/2019 at 09:23AM

103
#>252 - Khamnhoui-Boulom / @k_nhoui

09/16/2019 at 09:16AM

127
#>253 - Khamnhoui-Boulom / @k_nhoui

09/16/2019 at 08:51AM