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

254 active golfers, 862 entries

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

10/17/2019 at 08:25AM

22
#>76 - leo / @leo28356948

10/17/2019 at 08:24AM

23
#>108 - leo / @leo28356948

10/17/2019 at 08:23AM

24
#>132 - leo / @leo28356948

10/17/2019 at 08:21AM

25
#>148 - leo / @leo28356948

10/17/2019 at 08:21AM

26
#>161 - leo / @leo28356948

10/17/2019 at 08:18AM

27
#>176 - leo / @leo28356948

10/17/2019 at 08:17AM

28
#>202 - leo / @leo28356948

10/17/2019 at 08:14AM

29
#>223 - leo / @leo28356948

10/17/2019 at 08:12AM

30
#>230 - leo / @leo28356948

10/17/2019 at 08:08AM

31
#>233 - leo / @leo28356948

10/17/2019 at 08:06AM

36
#>243 - leo / @leo28356948

10/17/2019 at 08:04AM