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

216 active golfers, 724 entries

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

10/17/2019 at 08:25AM

22
#>64 - leo / @leo28356948

10/17/2019 at 08:24AM

23
#>89 - leo / @leo28356948

10/17/2019 at 08:23AM

24
#>109 - leo / @leo28356948

10/17/2019 at 08:21AM

25
#>122 - leo / @leo28356948

10/17/2019 at 08:21AM

26
#>134 - leo / @leo28356948

10/17/2019 at 08:18AM

27
#>148 - leo / @leo28356948

10/17/2019 at 08:17AM

28
#>172 - leo / @leo28356948

10/17/2019 at 08:14AM

29
#>191 - leo / @leo28356948

10/17/2019 at 08:12AM

30
#>197 - leo / @leo28356948

10/17/2019 at 08:08AM

31
#>198 - leo / @leo28356948

10/17/2019 at 08:06AM

36
#>206 - leo / @leo28356948

10/17/2019 at 08:04AM