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

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

224 active golfers, 759 entries

Solutions by @delonleonard:
21
#36 - Delon / @delonleonard

12/25/2019 at 06:41AM

22
#>76 - Delon / @delonleonard

12/25/2019 at 06:41AM

23
#>100 - Delon / @delonleonard

12/25/2019 at 06:39AM

24
#>117 - Delon / @delonleonard

12/25/2019 at 06:38AM

25
#>130 - Delon / @delonleonard

12/25/2019 at 06:37AM

26
#>144 - Delon / @delonleonard

12/25/2019 at 06:35AM

27
#>161 - Delon / @delonleonard

12/25/2019 at 06:33AM

28
#>186 - Delon / @delonleonard

12/25/2019 at 06:31AM

28
#>186 - Delon / @delonleonard

12/25/2019 at 06:37AM

35
#>214 - Delon / @delonleonard

12/25/2019 at 06:30AM