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

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

218 active golfers, 726 entries

Solutions by @hanavi:
22
#71 - James Casey / @hanavi

12/21/2019 at 02:42AM

23
#>94 - James Casey / @hanavi

12/21/2019 at 02:41AM

24
#>111 - James Casey / @hanavi

12/21/2019 at 02:30AM

24
#>111 - James Casey / @hanavi

12/21/2019 at 02:37AM

26
#>138 - James Casey / @hanavi

12/21/2019 at 02:27AM

27
#>155 - James Casey / @hanavi

12/21/2019 at 02:17AM

29
#>193 - James Casey / @hanavi

12/21/2019 at 02:15AM