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

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

218 active golfers, 726 entries

Solutions by @nicosierra84:
21
#37 - nicosierra / @nicosierra84

01/09/2020 at 11:05PM

22
#>71 - nicosierra / @nicosierra84

01/09/2020 at 11:03PM

23
#>94 - nicosierra / @nicosierra84

01/09/2020 at 11:01PM

24
#>112 - nicosierra / @nicosierra84

01/09/2020 at 11:00PM

26
#>139 - nicosierra / @nicosierra84

01/09/2020 at 10:55PM