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

0 comments


#39 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

39 active golfers, 150 entries

Leaderboard (lowest score wins):
31
#31 - Jangsea Park / @jangsea

11/28/2019 at 08:14PM

31
#32 - Delon / @delonleonard

12/25/2019 at 07:34AM

31
#33 - None / @sh1chuang

01/09/2020 at 12:24PM

32
#34 - FaeFeyFa / @fae_fey

11/29/2019 at 11:53PM

32
#35 - Nicolas Pagny / @NicolasPagny

12/02/2019 at 03:19PM

36
#36 - JimmyGymglish / @JGymglish

01/02/2020 at 01:22PM

37
#37 - Andrei Popescu / @AndreiTheory

12/09/2019 at 08:31PM

38
#38 - Steve Racanovic / @steve_racanovic

01/21/2020 at 02:15AM

38
#39 - Nik C / @nikclarx

01/28/2020 at 04:28AM