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

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

259 active golfers, 873 entries

Solutions by @nikclarx:
22
#86 - Nik C / @nikclarx

01/28/2020 at 04:27AM

23
#>115 - Nik C / @nikclarx

01/28/2020 at 04:23AM

24
#>139 - Nik C / @nikclarx

01/28/2020 at 04:22AM

25
#>153 - Nik C / @nikclarx

01/28/2020 at 04:19AM

26
#>170 - Nik C / @nikclarx

01/28/2020 at 04:16AM

27
#>189 - Nik C / @nikclarx

01/28/2020 at 02:28AM

32
#>245 - Nik C / @nikclarx

01/28/2020 at 01:44AM

33
#>245 - Nik C / @nikclarx

01/28/2020 at 01:39AM

34
#>245 - Nik C / @nikclarx

01/28/2020 at 01:31AM