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

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

258 active golfers, 872 entries

Solutions by @ether_fan:
22
#103 - EtherFan / @ether_fan

02/27/2024 at 06:11PM

23
#>122 - EtherFan / @ether_fan

02/27/2024 at 06:10PM

24
#>146 - EtherFan / @ether_fan

02/27/2024 at 06:09PM

25
#>157 - EtherFan / @ether_fan

02/27/2024 at 06:08PM

26
#>173 - EtherFan / @ether_fan

02/27/2024 at 06:06PM

30
#>236 - EtherFan / @ether_fan

02/27/2024 at 06:01PM