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

258 active golfers, 872 entries

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

10/17/2019 at 08:25AM

22
#>78 - leo / @leo28356948

10/17/2019 at 08:24AM

23
#>110 - leo / @leo28356948

10/17/2019 at 08:23AM

24
#>134 - leo / @leo28356948

10/17/2019 at 08:21AM

25
#>150 - leo / @leo28356948

10/17/2019 at 08:21AM

26
#>163 - leo / @leo28356948

10/17/2019 at 08:18AM

27
#>178 - leo / @leo28356948

10/17/2019 at 08:17AM

28
#>205 - leo / @leo28356948

10/17/2019 at 08:14AM

29
#>226 - leo / @leo28356948

10/17/2019 at 08:12AM

30
#>233 - leo / @leo28356948

10/17/2019 at 08:08AM

31
#>236 - leo / @leo28356948

10/17/2019 at 08:06AM

36
#>246 - leo / @leo28356948

10/17/2019 at 08:04AM