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

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

256 active golfers, 866 entries

Solutions by @eengstrom:
21
#23 - Erik Engstrom / @eengstrom

10/18/2019 at 09:40PM

22
#>78 - Erik Engstrom / @eengstrom

10/18/2019 at 09:39PM

23
#>111 - Erik Engstrom / @eengstrom

10/18/2019 at 09:37PM

24
#>134 - Erik Engstrom / @eengstrom

10/18/2019 at 09:36PM

25
#>150 - Erik Engstrom / @eengstrom

10/18/2019 at 09:35PM

26
#>163 - Erik Engstrom / @eengstrom

10/18/2019 at 09:34PM

27
#>178 - Erik Engstrom / @eengstrom

10/18/2019 at 08:32PM

28
#>204 - Erik Engstrom / @eengstrom

10/18/2019 at 08:29PM

29
#>225 - Erik Engstrom / @eengstrom

10/18/2019 at 08:27PM

30
#>232 - Erik Engstrom / @eengstrom

10/18/2019 at 08:25PM