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

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

216 active golfers, 724 entries

Solutions by @dahan74265266:
21
#28 - dahan / @dahan74265266

10/28/2019 at 12:50PM

22
#>64 - dahan / @dahan74265266

10/28/2019 at 12:48PM

23
#>91 - dahan / @dahan74265266

10/28/2019 at 12:46PM

24
#>109 - dahan / @dahan74265266

10/28/2019 at 12:36PM

25
#>123 - dahan / @dahan74265266

10/28/2019 at 12:32PM

26
#>136 - dahan / @dahan74265266

10/28/2019 at 12:28PM

27
#>148 - dahan / @dahan74265266

10/28/2019 at 12:25PM

28
#>175 - dahan / @dahan74265266

10/28/2019 at 12:24PM