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 128 remaining solutions by signing in and submitting your own entry
#129 Aaron / @_Lordofthevoid_ - Score: 100 - 11/21/19 @ 17:05
jllA<Esc>i = ''<Esc>j.j.j.j.kkkkhhhhyBf'plg~bjhhhlyBf'plg~FujFrlyBf'plg~BjhhhhyBf'plg~bjhhhhhybf'plg~Fu<Esc>:wq<CR>

0 comments


Created by: @argshook

129 active golfers, 438 entries

Leaderboard (lowest score wins):
21
#31 - Daniel Klepacki / @daniel_klepacki

11/12/2019 at 06:24PM

21
#32 - mogitate / @mutemeat

11/14/2019 at 03:25PM

21
#33 - Matt Aschmann / @ma7hatter

11/14/2019 at 08:53PM

21
#34 - oldandslow / @oldandslow5

11/29/2019 at 10:45PM

21
#35 - Nicolas Pagny / @NicolasPagny

12/06/2019 at 04:09PM

22
#36 - Adam Hartz / @awareofnow

09/19/2019 at 02:27AM

22
#37 - IronTiger Park / @IrontigerP

10/02/2019 at 01:37AM

22
#38 - ErQ325 / @EQ325

10/13/2019 at 10:24AM

22
#39 - Lory / @Lory46845742

10/30/2019 at 02:50PM

22
#40 - trafficone / @trafficone

11/02/2019 at 06:14AM

22
#41 - Chris Covert / @covertcj

11/07/2019 at 08:08PM

22
#42 - Wouter Horlings / @Achilleshiel

11/22/2019 at 04:04PM

22
#43 - Hector Ricardo / @Hector_Ricardo3

12/05/2019 at 04:29PM

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

09/06/2019 at 02:56PM

23
#45 - garry quested / @GQuested

09/09/2019 at 09:12AM

23
#46 - Baine Wedlock / @BaineWedlock

09/11/2019 at 02:07PM

23
#47 - dicekest / @dicekest

09/15/2019 at 04:25AM

23
#48 - vimgolfer / @vimgolfer7

09/20/2019 at 07:33AM

23
#49 - Michał Łowicki / @mlowicki

10/12/2019 at 09:59PM

23
#50 - tuck cursed on rerB / @19emtuck

10/13/2019 at 07:25PM

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

10/17/2019 at 07:24PM

23
#52 - Renan Cidale / @rnescalz

10/21/2019 at 11:07PM

23
#53 - shota_ogswr / @shota_ogasawara

11/24/2019 at 02:36PM

23
#54 - King Kang / @nobagtravel

12/11/2019 at 09:49AM

24
#55 - Arijus / @argshook

09/06/2019 at 01:16PM

24
#56 - Norbert / @mullno

09/06/2019 at 03:21PM

24
#57 - Daniel Steinberg / @dstein64

09/06/2019 at 08:49PM

24
#58 - Ivo Blöchliger / @aigledesalpes

09/07/2019 at 01:04PM

24
#59 - tPenguinLTG / @tpenguinltg

09/08/2019 at 03:35AM

24
#60 - Bradley M. Small / @BradleySmall

09/10/2019 at 02:18AM