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

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

259 active golfers, 873 entries

Solutions by @Samuel_OMalley:
21
#19 - Sam O'Malley / @Samuel_OMalley

10/11/2019 at 04:02PM

21
#>19 - Sam O'Malley / @Samuel_OMalley

10/11/2019 at 04:06PM

22
#>77 - Sam O'Malley / @Samuel_OMalley

10/11/2019 at 04:01PM

23
#>108 - Sam O'Malley / @Samuel_OMalley

10/11/2019 at 04:00PM

24
#>135 - Sam O'Malley / @Samuel_OMalley

10/11/2019 at 04:00PM

25
#>151 - Sam O'Malley / @Samuel_OMalley

10/11/2019 at 03:59PM

26
#>164 - Sam O'Malley / @Samuel_OMalley

10/11/2019 at 03:57PM

27
#>179 - Sam O'Malley / @Samuel_OMalley

10/11/2019 at 03:56PM