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):
23
#121 - 0xf00ff00f / @0xf00ff00f

12/18/2022 at 10:03AM

23
#122 - e_e / @eleloi

02/14/2023 at 09:58PM

23
#123 - Nathan Priego / @nspriego

02/24/2025 at 03:50AM

24
#124 - Arijus / @argshook

09/06/2019 at 01:16PM

24
#125 - Norbert / @mullno

09/06/2019 at 03:21PM

24
#126 - Dan / @dstein64

09/06/2019 at 08:49PM

24
#127 - Ivo Blöchliger / @aigledesalpes

09/07/2019 at 01:04PM

24
#128 - tPenguinLTG / @tpenguinltg

09/08/2019 at 03:35AM

24
#129 - Bradley M. Small / @BradleySmall

09/10/2019 at 02:18AM

24
#130 - yesuu / @yesuu15

09/11/2019 at 11:38AM

24
#131 - Ole / @Ole_Lnkoje

09/15/2019 at 04:01PM

24
#132 - Andrey / @andreyrmg

09/16/2019 at 02:46PM

24
#133 - Ollin Boer Bohan / @madebyollin

09/22/2019 at 03:50PM

24
#134 - Aioriya / @AioriyaDonk

09/23/2019 at 01:31AM

24
#135 - Miko / @_m_ik_o_

09/24/2019 at 07:44PM

24
#136 - GrimmT / @GrimmT10

11/01/2019 at 06:21PM

24
#137 - Kevin Yokley / @kyokley19

11/03/2019 at 09:55PM

24
#138 - sapir malka / @sapir5522

12/26/2019 at 08:49AM

24
#139 - Michael Meixner / @meixner62

01/22/2020 at 05:25PM

24
#140 - Daniel Amkær Sørensen / @AmkRensen

02/04/2020 at 09:53AM

24
#141 - Harsh Raj / @harshraj22aug

04/06/2020 at 06:52PM

24
#142 - volandkit / @volandkit

04/20/2020 at 11:21PM

24
#143 - Filipe Brandenburger / @filbranden

08/14/2020 at 04:24AM

24
#144 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 12:31PM

24
#145 - Levi Wheeler / @LeviWhe68726437

06/14/2022 at 09:26PM

24
#146 - Siddharth Murali / @SidTweetsALess

08/23/2022 at 01:11PM

24
#147 - Divvy C. / @divvy_c

08/11/2023 at 09:15PM

25
#148 - Bennett / @bennettbackward

09/11/2019 at 09:56AM

25
#149 - arsi arola / @mos_kiitto

09/13/2019 at 08:23PM

25
#150 - JS / @jjohsan

10/03/2019 at 07:57AM