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

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

259 active golfers, 873 entries

Solutions by @K4rnival:
21
#39 - Karnival K / @K4rnival

01/18/2020 at 08:17PM

22
#>85 - Karnival K / @K4rnival

01/18/2020 at 08:16PM

23
#>115 - Karnival K / @K4rnival

01/18/2020 at 08:15PM

24
#>138 - Karnival K / @K4rnival

01/18/2020 at 08:14PM

25
#>153 - Karnival K / @K4rnival

01/18/2020 at 08:13PM

26
#>169 - Karnival K / @K4rnival

01/18/2020 at 08:13PM

27
#>189 - Karnival K / @K4rnival

01/18/2020 at 08:11PM

28
#>213 - Karnival K / @K4rnival

01/18/2020 at 08:11PM

29
#>228 - Karnival K / @K4rnival

01/18/2020 at 08:10PM

29
#>228 - Karnival K / @K4rnival

01/18/2020 at 08:10PM

30
#>235 - Karnival K / @K4rnival

01/18/2020 at 08:08PM