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 5dd7ed687a0c210006a6820f

Refactor typescript arrow function type

Make arrow function type less verbose and easier to read

Start file
export const playground: (
 
object?: Partial<PlaygroundSection>,
) => PlaygroundSection = config =>
  baseSection
({
    type
: SectionType.Playground,
   
...config,
 
});
End file
export const playground = (
  config
?: Partial<PlaygroundSection>,
): PlaygroundSection =>
  baseSection
({
    type
: SectionType.Playground,
   
...config,
 
});

View Diff

1,3c1,3
< export const playground: (
<   object?: Partial<PlaygroundSection>,
< ) => PlaygroundSection = config =>
---
> export const playground = (
>   config?: Partial<PlaygroundSection>,
> ): PlaygroundSection =>

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 70 remaining solutions by signing in and submitting your own entry
#71 fff / @fff51460170 - Score: 42 - 02/21/21 @ 07:14
f:a<BS> =<Esc><Down>0wdw<Down><Left>dtPi: <Esc>f=dt=<Up>0w<Left>px:<BS>0wxx:wq<CR>

0 comments


Created by: @argshook

71 active golfers, 323 entries

Leaderboard (lowest score wins):
21
#31 - chocolate / @chocola81394123

11/29/2020 at 10:28AM

21
#32 - Luoyb / @Luoyb

10/27/2023 at 06:05AM

21
#33 - naka / @nak38223985244

01/20/2024 at 02:32AM

22
#34 - Jon Krause / @jkrause314

11/23/2019 at 04:40PM

22
#35 - Roger Stoltz / @rogsto1

11/24/2019 at 10:24PM

22
#36 - Tinko Minko / @tandikula

11/26/2019 at 05:28PM

22
#37 - James Casey / @hanavi

12/21/2019 at 05:29AM

22
#38 - garry quested / @GQuested

01/15/2020 at 10:04AM

22
#39 - floyd / @floyd10086

03/19/2020 at 10:08AM

23
#40 - Alexander L. / @Lexol4s

11/28/2019 at 07:07PM

23
#41 - Jason Neylon / @jasonneylon

12/21/2019 at 03:11PM

23
#42 - Tanzeel Kazi / @tanzeelkazi

08/24/2020 at 06:51PM

25
#43 - Jason / @roosjason

05/12/2020 at 08:19AM

25
#44 - quemeraisc / @quemeraisc

08/23/2022 at 02:49PM

26
#45 - Dan Kilman / @dan_kilman

12/19/2019 at 06:08PM

26
#46 - PotatoKing / @PotatoK72775616

03/27/2020 at 09:57PM

27
#47 - Zachary Neubert / @Mr_Saturn16347

11/22/2019 at 10:14PM

27
#48 - Bennett / @bennettbackward

12/29/2019 at 02:37AM

27
#49 - RockerZZY / @rocker_zzy

05/28/2020 at 01:22PM

27
#50 - James / @Dronak

11/30/2022 at 09:45PM

28
#51 - Arijus / @argshook

11/22/2019 at 02:19PM

28
#52 - Mike Harris / @MikeMJHarris

11/22/2019 at 03:26PM

28
#53 - grsh / @girish_i_am

05/28/2021 at 07:31PM

29
#54 - Joren Van Hee / @jorenvanhee

11/22/2019 at 02:37PM

29
#55 - Goshine / @AaronGoshine

11/22/2019 at 04:53PM

29
#56 - Rishabh Dwivedi / @Rishabh45312910

11/23/2019 at 02:36PM

29
#57 - shota_ogswr / @shota_ogasawara

11/24/2019 at 01:10PM

29
#58 - Bida Wa / @bida_wa

11/28/2019 at 09:31PM

31
#59 - Jangsea Park / @jangsea

11/28/2019 at 08:14PM

31
#60 - Delon / @delonleonard

12/25/2019 at 07:34AM