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 by @phaym:

Unlock 9 remaining solutions by signing in and submitting your own entry
Created by: @argshook

73 active golfers, 339 entries

Solutions by @phaym:
23
#44 - phaym / @phaym

10/14/2025 at 12:07AM

25
#>46 - phaym / @phaym

10/14/2025 at 12:05AM

26
#>48 - phaym / @phaym

10/14/2025 at 12:04AM

27
#>52 - phaym / @phaym

10/14/2025 at 12:02AM

27
#>52 - phaym / @phaym

10/14/2025 at 12:04AM

30
#>60 - phaym / @phaym

10/13/2025 at 11:59PM

31
#>63 - phaym / @phaym

10/13/2025 at 11:52PM

32
#>66 - phaym / @phaym

10/13/2025 at 11:49PM

41
#>72 - phaym / @phaym

10/13/2025 at 11:49PM