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 255 remaining solutions by signing in and submitting your own entry
#256 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

256 active golfers, 866 entries

Leaderboard (lowest score wins):
22
#91 - RaylanFox / @RaylanFox

04/07/2020 at 05:50PM

22
#92 - GenericHardwareGamer / @GnrikHrdwrGamer

08/27/2020 at 08:25AM

22
#93 - Martin Bielik / @mabielik

09/05/2020 at 08:57PM

22
#94 - chocolate / @chocola81394123

10/28/2020 at 04:15PM

22
#95 - Demian Martinez / @demianuco

12/09/2020 at 09:06PM

22
#96 - Marion Oldman / @ThatBigCock

01/16/2021 at 11:41PM

22
#97 - JVIM / @JVIM101

03/07/2022 at 12:05PM

22
#98 - Ilay Skutelsky / @ISkutelsky

08/04/2022 at 08:24PM

22
#99 - ._. / @Katharsic

11/23/2022 at 06:07PM

22
#100 - steve / @steve35773420

04/20/2023 at 08:15PM

22
#101 - Игорь Квачёнок / @IKvacenok

06/15/2023 at 07:04PM

22
#102 - moh ayaya / @AyayaMoh

08/31/2023 at 03:43PM

22
#103 - EtherFan / @ether_fan

02/27/2024 at 06:11PM

23
#104 - Καράτε Μόνο / @karate_mono

09/06/2019 at 02:56PM

23
#105 - garry quested / @GQuested

09/09/2019 at 09:12AM

23
#106 - Baine Wedlock / @BaineWedlock

09/11/2019 at 02:07PM

23
#107 - dicekest / @dicekest

09/15/2019 at 04:25AM

23
#108 - vimgolfer / @vimgolfer7

09/20/2019 at 07:33AM

23
#109 - Michał Łowicki / @mlowicki

10/12/2019 at 09:59PM

23
#110 - tuck / @19emtuck

10/13/2019 at 07:25PM

23
#111 - Константин / @pillar_vandyke

10/17/2019 at 07:24PM

23
#112 - Renan Cidale / @rnescalz

10/21/2019 at 11:07PM

23
#113 - shota_ogswr / @shota_ogasawara

11/24/2019 at 02:36PM

23
#114 - King Kang / @nobagtravel

12/11/2019 at 09:49AM

23
#115 - Dan Kilman / @dan_kilman

12/19/2019 at 01:02PM

23
#116 - BnnGolfer / @BnnGolfer

03/26/2020 at 07:20PM

23
#117 - dule2607 / @dule26071

05/02/2020 at 08:24AM

23
#118 - traplover / @traplov78528337

01/17/2021 at 08:12PM

23
#119 - Irakli Chigvaria / @tchigvaria

08/21/2022 at 05:23PM

23
#120 - キムラ・OPEL・ユウジ / @kimurayuuji79

11/15/2022 at 03:53AM