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

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

213 active golfers, 720 entries

Solutions by @mario_olofo:
21
#21 - Mario Olofo / @mario_olofo

10/16/2019 at 08:39PM

22
#>63 - Mario Olofo / @mario_olofo

10/16/2019 at 08:39PM

23
#>88 - Mario Olofo / @mario_olofo

10/16/2019 at 08:22PM

23
#>88 - Mario Olofo / @mario_olofo

10/16/2019 at 08:24PM

24
#>107 - Mario Olofo / @mario_olofo

10/16/2019 at 08:22PM

24
#>107 - Mario Olofo / @mario_olofo

10/16/2019 at 08:24PM

26
#>132 - Mario Olofo / @mario_olofo

10/16/2019 at 08:19PM

27
#>146 - Mario Olofo / @mario_olofo

10/16/2019 at 08:17PM