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

258 active golfers, 872 entries

Leaderboard (lowest score wins):
28
#211 - glopz / @gl0pz

12/08/2019 at 09:14PM

28
#212 - Isaak Meier / @IsaakMeier

12/12/2019 at 03:16AM

28
#213 - beew71493 / @beew71493

01/27/2020 at 05:36AM

28
#214 - Falafel Palapel / @falafelpalapel

02/16/2020 at 06:02PM

28
#215 - Mack Hutsell / @sellshuts

06/15/2020 at 01:31AM

28
#216 - dotvimrc / @dotvimrc1

07/07/2020 at 06:44AM

28
#217 - Kaustubh Murumkar / @k_austub_h

08/31/2020 at 08:14PM

28
#218 - Eric Banisadr / @ebanisadr

12/13/2020 at 11:25AM

28
#219 - jimmarq / @jimmarq

11/01/2022 at 03:50PM

28
#220 - Olivier Bégassat / @zk_evm

06/11/2023 at 05:47PM

28
#221 - 咸糖🎯 / @GIA917229015

01/04/2024 at 03:49PM

29
#222 - greengreen / @greengr09073862

09/06/2019 at 04:58PM

29
#223 - Abnermtj / @Abnerjr19

09/09/2019 at 02:55AM

29
#224 - Jose Soto / @JoseCanHelp

09/10/2019 at 03:30AM

29
#225 - Benjamin Pelletier / @benjipelletier

09/25/2019 at 08:45PM

29
#226 - Jonathan Medwig / @jmedwig

10/15/2019 at 02:32PM

29
#227 - Emil Braserud / @Erdustiggen

11/08/2019 at 05:21PM

29
#228 - majo senf / @majo_senf

07/14/2020 at 08:58AM

29
#229 - Theo Sarrazin / @tshaero

08/18/2020 at 02:00PM

29
#230 - Ray Dennis / @raysden

01/11/2021 at 03:16PM

29
#231 - Desentcare / @ashuyali

08/25/2022 at 10:39AM

30
#232 - 5th Human on Mars / @JoshTheWhite

09/08/2019 at 03:35AM

30
#233 - Iggy / @iggredible

09/10/2019 at 03:48AM

30
#234 - ENSORIZATION / @ensorization

11/01/2019 at 11:50PM

30
#235 - vimgolfaccfekxh / @vimgolfaccfekxh

10/19/2022 at 11:10PM

30
#236 - Takeru Osoegawa / @taktiks2

12/18/2022 at 08:49AM

31
#237 - Jacob Shomstein / @jshoms

07/25/2020 at 04:23AM

31
#238 - fff / @fff51460170

02/20/2021 at 04:09PM

31
#239 - x03n046 / @x03n046

05/06/2022 at 06:50AM

32
#240 - Raphael Marra / @rtmarra

09/06/2019 at 08:38PM