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):
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

21
#36 - Delon / @delonleonard

12/25/2019 at 06:41AM

21
#37 - nicosierra / @nicosierra84

01/09/2020 at 11:05PM

21
#38 - mowglian / @mowglian

01/13/2020 at 12:10PM

21
#39 - Karnival K / @K4rnival

01/18/2020 at 08:17PM

21
#40 - Tefe / @tefetic

01/31/2020 at 10:03PM

21
#41 - howanto / @ho_wan_

02/20/2020 at 01:23PM

21
#42 - せいほう / @FICSQF

03/13/2020 at 02:40AM

21
#43 - Sean Dewar / @seandewar

03/13/2020 at 07:59PM

21
#44 - edvrds / @edvrds

04/18/2020 at 07:49PM

21
#45 - Arthur Goodman / @ArthurGoodman3

04/30/2020 at 07:52PM

21
#46 - Moatvald / @moatvald

05/06/2020 at 08:00AM

21
#47 - 于吉星 / @fishermryn

05/28/2020 at 08:24AM

21
#48 - Kevin Keefe / @KevinKeefe5

06/05/2020 at 04:37PM

21
#49 - Valdimar / @genkobar

06/06/2020 at 04:40PM

21
#50 - samet ぷ / @jssamet

07/04/2020 at 11:00AM

21
#51 - Tiago Nascimento / @tigum27

07/18/2020 at 06:50PM

21
#52 - Tanzeel Kazi / @tanzeelkazi

08/18/2020 at 03:52AM

21
#53 - Blake Tereau / @BlakeTereau

09/11/2020 at 03:15AM

21
#54 - speisz / @speiszc

09/29/2020 at 10:41PM

21
#55 - lamtt77 / @lamtt77

10/11/2020 at 02:39AM

21
#56 - hepebexè / @hepebexe

11/18/2020 at 09:52PM

21
#57 - __VimGolfer__ / @VimGolfer19

11/29/2020 at 03:33PM

21
#58 - roudens / @roudens2

12/27/2020 at 02:31PM

21
#59 - Jung Yeon Park / @park_jungy

01/08/2021 at 01:07AM

21
#60 - Björn Struckmeier / @BjrnStruckmeie1

01/08/2021 at 12:46PM