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

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

258 active golfers, 872 entries

Solutions by @trafficone:
22
#80 - trafficone / @trafficone

11/02/2019 at 06:14AM

23
#>112 - trafficone / @trafficone

11/02/2019 at 06:10AM

24
#>135 - trafficone / @trafficone

11/02/2019 at 06:08AM

26
#>165 - trafficone / @trafficone

11/02/2019 at 05:56AM

26
#>165 - trafficone / @trafficone

11/02/2019 at 05:58AM

27
#>178 - trafficone / @trafficone

11/02/2019 at 05:54AM

28
#>209 - trafficone / @trafficone

11/02/2019 at 05:48AM

29
#>226 - trafficone / @trafficone

10/31/2019 at 09:29PM

33
#>244 - trafficone / @trafficone

10/31/2019 at 09:27PM