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):
27
#181 - pysnow530 / @pysnow530

11/19/2019 at 10:43AM

27
#182 - Magnus / @praktiskt

11/21/2019 at 05:29PM

27
#183 - 李嘉浩 / @isundaylee

11/24/2019 at 07:02AM

27
#184 - Izaak van Dongen / @goedel_gang

12/01/2019 at 11:38PM

27
#185 - Marten Ringwelski / @Marteon27

12/12/2019 at 03:36PM

27
#186 - JimmyGymglish / @JGymglish

01/06/2020 at 03:11PM

27
#187 - Victor Chen / @VictorC89422342

01/10/2020 at 05:03PM

27
#188 - caffeineism / @caffeineism

01/10/2020 at 06:09PM

27
#189 - Steve Racanovic / @steve_racanovic

01/13/2020 at 09:37PM

27
#190 - Oleg / @colega

01/28/2020 at 10:55PM

27
#191 - Nick Lee / @TooManyNickLees

04/05/2020 at 05:33PM

27
#192 - RockerZZY / @rocker_zzy

05/27/2020 at 04:08AM

27
#193 - vito / @vito49999722

08/17/2020 at 07:41PM

27
#194 - Manas / @weirdsmiley_

11/24/2020 at 01:29PM

27
#195 - Fabrizio Perria / @FPerria

12/23/2020 at 05:08PM

27
#196 - 蔡徐坤真是爱吃屎 / @Hashub7

01/20/2021 at 04:53PM

27
#197 - Brandon / @Brandon10678836

08/26/2022 at 11:28AM

27
#198 - Abdelrahman Madkour / @A3Madkour

08/27/2022 at 03:44PM

27
#199 - KoroneListener / @KoroneListener

09/05/2024 at 06:01PM

28
#200 - Walker Boh / @walker_boh

09/06/2019 at 01:21PM

28
#201 - Floyd Gantt / @fgantt

09/06/2019 at 01:30PM

28
#202 - bsjd / @bsjd

09/10/2019 at 12:14PM

28
#203 - Jonathan Eidsness / @jonathaneidsnes

09/12/2019 at 07:49PM

28
#204 - Jason Birchall / @jsonBirchall

09/13/2019 at 08:50AM

28
#205 - Ariel Miculas / @ArielMiculas

09/18/2019 at 02:58PM

28
#206 - phe / @phelipetls

09/22/2019 at 02:12PM

28
#207 - Daniel Rollins / @DanielJRollins

10/25/2019 at 02:18PM

28
#208 - rr / @rodgeur31

10/25/2019 at 10:43PM

28
#209 - Alex Emelianov / @AlexEmelianov3

10/26/2019 at 12:54AM

28
#210 - Yāsky / @Yaasky

11/01/2019 at 05:18PM