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 194 remaining solutions by signing in and submitting your own entry
#195 Sergio Soares / @sergsoares - Score: 108 - 04/24/20 @ 03:25
:$<BS>%s/, <BS>/ = ''m<BS>,/g<CR><C-C><C-C>a<C-C><C-C>eeeli<C-C><C-C>iUNKNOWN<C-C><C-C>bkehiPUP<BS>PPETEER<C-C><C-C>kbaPROTA<BS>RACTOR<C-C><C-C>kbaUNIDRIVER<C-C><C-C>kbaVANILLA<C-C><C-C>:wq<CR>

0 comments


Created by: @argshook

195 active golfers, 668 entries

Leaderboard (lowest score wins):
26
#121 - Soptik / @Soptik3

10/06/2019 at 11:06PM

26
#122 - MasterFox / @MaestroZorro_

10/22/2019 at 01:07PM

26
#123 - Alejandro Frias / @AlejandroFria17

10/23/2019 at 08:12PM

26
#124 - manfred knapp / @fred_pooshka

11/09/2019 at 10:14PM

26
#125 - Andrei Popescu / @AndreiTheory

12/09/2019 at 09:01PM

26
#126 - None / @sh1chuang

12/30/2019 at 03:20PM

26
#127 - Rune Warhuus / @DinkDonkNorway

01/22/2020 at 11:42PM

26
#128 - Anthony BERNARD / @TweetTontony

03/03/2020 at 09:11PM

26
#129 - Rustem B. / @_rustemb

07/31/2020 at 12:15PM

26
#130 - mindgitrwx / @mindgitrwx

08/09/2020 at 02:12AM

27
#131 - Charlie OConor / @charlieoconor

09/06/2019 at 05:34PM

27
#132 - Daniel Beck / @daniel_beck_il

09/09/2019 at 04:09PM

27
#133 - louis / @LouisJordan

09/10/2019 at 07:58AM

27
#134 - vim_ninja / @NinjaVim

09/14/2019 at 09:28PM

27
#135 - majuscule / @majuscule13

10/08/2019 at 07:17PM

27
#136 - alibabadienstaccount / @alibabadiensta1

11/14/2019 at 04:10PM

27
#137 - pysnow530 / @pysnow530

11/19/2019 at 10:43AM

27
#138 - Magnus / @praktiskt

11/21/2019 at 05:29PM

27
#139 - 李嘉浩 / @isundaylee

11/24/2019 at 07:02AM

27
#140 - Izaak van Dongen / @goedel_gang

12/01/2019 at 11:38PM

27
#141 - Marten Ringwelski / @Marteon27

12/12/2019 at 03:36PM

27
#142 - JimmyGymglish / @JGymglish

01/06/2020 at 03:11PM

27
#143 - Victor Chen / @VictorC89422342

01/10/2020 at 05:03PM

27
#144 - caffeineism / @caffeineism

01/10/2020 at 06:09PM

27
#145 - Steve Racanovic / @steve_racanovic

01/13/2020 at 09:37PM

27
#146 - Oleg / @colega

01/28/2020 at 10:55PM

27
#147 - Nick Lee / @TooManyNickLees

04/05/2020 at 05:33PM

27
#148 - RockerZZY / @rocker_zzy

05/27/2020 at 04:08AM

27
#149 - vito / @vito49999722

08/17/2020 at 07:41PM

28
#150 - Walker Boh / @walker_boh

09/06/2019 at 01:21PM