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

213 active golfers, 720 entries

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

10/18/2019 at 09:40PM

22
#>63 - Erik Engstrom / @eengstrom

10/18/2019 at 09:39PM

23
#>89 - Erik Engstrom / @eengstrom

10/18/2019 at 09:37PM

24
#>107 - Erik Engstrom / @eengstrom

10/18/2019 at 09:36PM

25
#>120 - Erik Engstrom / @eengstrom

10/18/2019 at 09:35PM

26
#>132 - Erik Engstrom / @eengstrom

10/18/2019 at 09:34PM

27
#>146 - Erik Engstrom / @eengstrom

10/18/2019 at 08:32PM

28
#>169 - Erik Engstrom / @eengstrom

10/18/2019 at 08:29PM

29
#>188 - Erik Engstrom / @eengstrom

10/18/2019 at 08:27PM

30
#>194 - Erik Engstrom / @eengstrom

10/18/2019 at 08:25PM