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

The best way to learn is to practice. Below, you will find some of the solutions other golfers have entered. To unlock higher ranked solutions, submit your own entry which does as well or better than the solutions you can currently see - climb the ladder!

Check out these helpful resources to improve your Vim skills... Game on.

Unlock 258 remaining solutions by signing in and submitting your own entry
#259 Golfer / @golfplayervim - Score: 206 - 04/26/23 @ 16:46
<CR>yeep<C-Z>zzzzzxxxxxxxx<Right>x<Right>lla,<Esc>lkjjlllljjhh22222222<CR>5-yUspppp<Esc>ppppp<BS><BS><BS><BS><BS><BS>uuuuuuua,<Esc><Left><Left><Left><Left><Left><Left><Left>u,a,<Esc>bywea = ''<Esc>jkh<0xc3><0xa5>p<C-V>bU3<CR>2-yeea 0<BS>= ''<Esc>jkhpUPuU<Right><Right><Left><C-V>bU<CR>yeea = <0xc3><0xa4><BS>''<Esc>hp<C-V>bU<CR>yee = ea = ''h<BS><Esc>hp<C-V>bU<CR>yeea = **<BS><BS>''<Esc>hp<C-V>bU:wq<CR>

0 comments


Created by: @argshook

259 active golfers, 873 entries

Leaderboard (lowest score wins):
32
#241 - Raphael Marra / @rtmarra

09/06/2019 at 08:38PM

32
#242 - Ralph Callaway / @RalphAtCCC

09/13/2019 at 09:03AM

32
#243 - Khamnhoui-Boulom / @k_nhoui

09/16/2019 at 11:47AM

32
#244 - EL KESRI Othmane / @KesriOthmane

09/16/2019 at 01:35PM

32
#245 - 5m0r14x / @5m0r14x

01/11/2020 at 12:25AM

35
#246 - asfsef / @asfsef5

09/12/2019 at 01:50AM

35
#247 - Alex Bartol / @alexbartol

09/13/2019 at 12:24AM

38
#248 - Alexey Kuntsevich / @jezzarax

09/09/2019 at 09:59AM

43
#249 - Howl / @Howlxx55

11/08/2019 at 05:48PM

43
#250 - justinhj / @justinhj

12/31/2020 at 04:16AM

44
#251 - Di Liu / @Skyerliu

06/21/2020 at 03:27AM

44
#252 - mojito04 / @mojito04

08/28/2024 at 09:28PM

47
#253 - julio marins / @AJ07mm

09/09/2019 at 04:42PM

49
#254 - kijete3127 / @kijete3127

12/13/2020 at 05:17PM

70
#255 - Bradley Cushing / @bradleycushing

09/08/2019 at 02:37PM

92
#256 - Eliseo / @Eliseohh_A

11/27/2019 at 02:38PM

100
#257 - Aaron / @_Lordofthevoid_

11/21/2019 at 05:05PM

108
#258 - Sergio Soares / @sergsoares

04/24/2020 at 03:25AM

206
#259 - Golfer / @golfplayervim

04/26/2023 at 04:46PM