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

254 active golfers, 862 entries

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

01/18/2020 at 08:17PM

22
#>83 - Karnival K / @K4rnival

01/18/2020 at 08:16PM

23
#>113 - Karnival K / @K4rnival

01/18/2020 at 08:15PM

24
#>135 - Karnival K / @K4rnival

01/18/2020 at 08:14PM

25
#>150 - Karnival K / @K4rnival

01/18/2020 at 08:13PM

26
#>166 - Karnival K / @K4rnival

01/18/2020 at 08:13PM

27
#>186 - Karnival K / @K4rnival

01/18/2020 at 08:11PM

28
#>209 - Karnival K / @K4rnival

01/18/2020 at 08:11PM

29
#>224 - Karnival K / @K4rnival

01/18/2020 at 08:10PM

29
#>224 - Karnival K / @K4rnival

01/18/2020 at 08:10PM

30
#>231 - Karnival K / @K4rnival

01/18/2020 at 08:08PM