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):
31
#61 - None / @sh1chuang

01/09/2020 at 12:24PM

32
#62 - FaeFeyFa / @fae_fey

11/29/2019 at 11:53PM

32
#63 - Nicolas Pagny / @NicolasPagny

12/02/2019 at 03:19PM

32
#64 - Karol Łukaszewicz / @Karolukaszewicz

06/25/2020 at 11:56AM

34
#65 - Joe Farnsworth / @JoeFarnsworth

06/22/2021 at 01:23PM

36
#66 - JimmyGymglish / @JGymglish

01/02/2020 at 01:22PM

36
#67 - drGsus / @drGsus

07/30/2020 at 10:12AM

37
#68 - Andrei Popescu / @AndreiTheory

12/09/2019 at 08:31PM

38
#69 - Steve Racanovic / @steve_racanovic

01/21/2020 at 02:15AM

38
#70 - Nik C / @nikclarx

01/28/2020 at 04:28AM

42
#71 - fff / @fff51460170

02/21/2021 at 07:14AM