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
#61 - Horst / @Horst91706815

01/21/2021 at 05:32PM

21
#62 - Roman Privalov / @RomanPrivalov

09/23/2021 at 11:44AM

21
#63 - yancy / @yancy_dong

09/26/2021 at 02:49AM

21
#64 - Humbaba / @humbabu

01/09/2022 at 07:13PM

21
#65 - dorianm / @dorianm

05/08/2022 at 10:17PM

21
#66 - quemeraisc / @quemeraisc

05/15/2022 at 04:48PM

21
#67 - }(⇒){ / @TangerinePlank

06/18/2022 at 05:49AM

21
#68 - Alex / @AlexanderHeatl2

07/06/2022 at 09:53PM

21
#69 - Janzen / @__Coos

10/04/2022 at 11:54AM

21
#70 - Omar Alawadhi / @OmarAla59544225

10/19/2022 at 11:15PM

21
#71 - ky05uk3 / @kyo89347563

12/09/2022 at 02:09AM

21
#72 - Himanshu Tank / @himanshutank75

12/20/2022 at 05:37PM

21
#73 - MonkieeBoi / @MonkieeBoi

02/03/2024 at 11:26AM

21
#74 - Aly Thobani / @alythobani

05/30/2024 at 09:23PM

21
#75 - Peppa Pig / @PeppaPi95550250

07/02/2024 at 07:02AM

22
#76 - Adam Hartz / @awareofnow

09/19/2019 at 02:27AM

22
#77 - IronTiger Park / @IrontigerP

10/02/2019 at 01:37AM

22
#78 - ErQ325 / @EQ325

10/13/2019 at 10:24AM

22
#79 - Lory / @Lory46845742

10/30/2019 at 02:50PM

22
#80 - trafficone / @trafficone

11/02/2019 at 06:14AM

22
#81 - Chris Covert / @covertcj

11/07/2019 at 08:08PM

22
#82 - Wouter Horlings / @Achilleshiel

11/22/2019 at 04:04PM

22
#83 - Hector Ricardo / @Hector_Ricardo3

12/05/2019 at 04:29PM

22
#84 - Jason Neylon / @jasonneylon

12/19/2019 at 06:41PM

22
#85 - James Casey / @hanavi

12/21/2019 at 02:42AM

22
#86 - Nik C / @nikclarx

01/28/2020 at 04:27AM

22
#87 - countime / @countime1

03/06/2020 at 06:05AM

22
#88 - floyd / @floyd10086

03/09/2020 at 05:30AM

22
#89 - Ryan Nevius / @ryannevius

03/22/2020 at 01:54PM

22
#90 - John Doe / @JohnDoe77150954

03/22/2020 at 05:47PM