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

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

226 active golfers, 765 entries

Solutions by @leo28356948:
21
#22 - leo / @leo28356948

10/17/2019 at 08:25AM

22
#>70 - leo / @leo28356948

10/17/2019 at 08:24AM

23
#>96 - leo / @leo28356948

10/17/2019 at 08:23AM

24
#>116 - leo / @leo28356948

10/17/2019 at 08:21AM

25
#>130 - leo / @leo28356948

10/17/2019 at 08:21AM

26
#>142 - leo / @leo28356948

10/17/2019 at 08:18AM

27
#>157 - leo / @leo28356948

10/17/2019 at 08:17AM

28
#>181 - leo / @leo28356948

10/17/2019 at 08:14AM

29
#>199 - leo / @leo28356948

10/17/2019 at 08:12AM

30
#>205 - leo / @leo28356948

10/17/2019 at 08:08AM

31
#>206 - leo / @leo28356948

10/17/2019 at 08:06AM

36
#>216 - leo / @leo28356948

10/17/2019 at 08:04AM