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 49 remaining solutions by signing in and submitting your own entry
#50 Steve Racanovic / @steve_racanovic - Score: 38 - 01/21/20 @ 02:15
f:xi =<Esc>:%s/object/config<CR>j3xhi:<Esc>f=9xZZ

0 comments


#51 Nik C / @nikclarx - Score: 38 - 01/28/20 @ 04:28
f:xi =<Esc>:%s/object/config<CR>j3xhi:<Esc>f=9xZZ

0 comments


Created by: @argshook

51 active golfers, 216 entries

Leaderboard (lowest score wins):
27
#31 - Zachary Neubert / @Mr_Saturn16347

11/22/2019 at 10:14PM

27
#32 - Bennett / @bennettbackward

12/29/2019 at 02:37AM

27
#33 - RockerZZY / @rocker_zzy

05/28/2020 at 01:22PM

28
#34 - Arijus / @argshook

11/22/2019 at 02:19PM

28
#35 - Mike Harris / @MikeMJHarris

11/22/2019 at 03:26PM

29
#36 - Joren Van Hee / @jorenvanhee

11/22/2019 at 02:37PM

29
#37 - Goshine / @AaronGoshine

11/22/2019 at 04:53PM

29
#38 - Rishabh Dwivedi / @Rishabh45312910

11/23/2019 at 02:36PM

29
#39 - shota_ogswr / @shota_ogasawara

11/24/2019 at 01:10PM

29
#40 - Bida Wa / @bida_wa

11/28/2019 at 09:31PM

31
#41 - Jangsea Park / @jangsea

11/28/2019 at 08:14PM

31
#42 - Delon / @delonleonard

12/25/2019 at 07:34AM

31
#43 - None / @sh1chuang

01/09/2020 at 12:24PM

32
#44 - FaeFeyFa / @fae_fey

11/29/2019 at 11:53PM

32
#45 - Nicolas Pagny / @NicolasPagny

12/02/2019 at 03:19PM

32
#46 - Karol Ɓukaszewicz / @Karolukaszewicz

06/25/2020 at 11:56AM

36
#47 - JimmyGymglish / @JGymglish

01/02/2020 at 01:22PM

36
#48 - drGsus / @drGsus

07/30/2020 at 10:12AM

37
#49 - Andrei Popescu / @AndreiTheory

12/09/2019 at 08:31PM

38
#50 - Steve Racanovic / @steve_racanovic

01/21/2020 at 02:15AM

38
#51 - Nik C / @nikclarx

01/28/2020 at 04:28AM