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

226 active golfers, 765 entries

Leaderboard (lowest score wins):
24
#121 - Daniel Amkær Sørensen / @AmkRensen

02/04/2020 at 09:53AM

24
#122 - Harsh Raj / @harshraj22aug

04/06/2020 at 06:52PM

24
#123 - volandkit / @volandkit

04/20/2020 at 11:21PM

24
#124 - Filipe Brandenburger / @filbranden

08/14/2020 at 04:24AM

24
#125 - Martin Kauppinen / @MartinKauppinen

08/16/2020 at 12:31PM

24
#126 - Levi Wheeler / @LeviWhe68726437

06/14/2022 at 09:26PM

25
#127 - Bennett / @bennettbackward

09/11/2019 at 09:56AM

25
#128 - arsi arola / @mos_kiitto

09/13/2019 at 08:23PM

25
#129 - JS / @jjohsan

10/03/2019 at 07:57AM

25
#130 - Geert Smelt / @gasmelt

10/11/2019 at 02:37PM

25
#131 - vicver09 / @vicver091

10/27/2019 at 02:08PM

25
#132 - Jonathan Jeffrey / @projjects

12/05/2019 at 06:22AM

25
#133 - Emil / @emilklindt

02/16/2020 at 09:45PM

25
#134 - Jason / @roosjason

04/17/2020 at 10:40AM

25
#135 - Vinay Sharma / @VinaySh63956554

08/11/2020 at 07:43AM

25
#136 - Brendan Schaenzer / @bschaenzer

09/30/2020 at 07:11PM

26
#137 - Alexander L. / @Lexol4s

09/16/2019 at 10:20PM

26
#138 - ollir / @ollir19

09/17/2019 at 07:43PM

26
#139 - Jonathan Lozinski / @jlozinski

09/20/2019 at 12:45PM

26
#140 - dpetrovic_vimgolf / @dpetrovicvimgo1

09/26/2019 at 11:36AM

26
#141 - Josefina Alconada / @jochiAlconada

10/03/2019 at 01:33PM

26
#142 - Soptik / @Soptik3

10/06/2019 at 11:06PM

26
#143 - MasterFox / @MaestroZorro_

10/22/2019 at 01:07PM

26
#144 - Alejandro Frias / @AlejandroFria17

10/23/2019 at 08:12PM

26
#145 - manfred knapp / @fred_pooshka

11/09/2019 at 10:14PM

26
#146 - Andrei Popescu / @AndreiTheory

12/09/2019 at 09:01PM

26
#147 - None / @sh1chuang

12/30/2019 at 03:20PM

26
#148 - Rune Warhuus / @DinkDonkNorway

01/22/2020 at 11:42PM

26
#149 - Anthony BERNARD / @TweetTontony

03/03/2020 at 09:11PM

26
#150 - Rustem B. / @_rustemb

07/31/2020 at 12:15PM