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):
20
#1 - Smylers / @Smylers2

11/25/2019 at 11:02AM

20
#2 - Saki Gw / @Sakigw

11/25/2019 at 11:14AM

20
#3 - John Braxler / @braxler

11/25/2019 at 04:08PM

20
#4 - Matt Aschmann / @ma7hatter

11/25/2019 at 06:39PM

20
#5 - Eviber / @youvaaaaa

11/27/2019 at 10:25AM

20
#6 - Marc Päpper / @mpaepper

11/27/2019 at 09:21PM

20
#7 - Hector Ricardo / @Hector_Ricardo3

11/29/2019 at 04:13AM

20
#8 - bruno cunha / @brn_cnh

11/29/2019 at 11:45PM

20
#9 - vimgolfer / @vimgolfer7

12/01/2019 at 02:51AM

20
#10 - Roger Bongers / @RogerBongers

12/01/2019 at 03:11AM

20
#11 - Pierre Balayé / @PierreBalaye

12/07/2019 at 02:31PM

20
#12 - sooqua / @sooqua

12/18/2019 at 01:26PM

20
#13 - Flowepmed S. Sirch / @iluvfugu

01/17/2020 at 07:22AM

20
#14 - howanto / @ho_wan_

02/24/2020 at 11:53PM

20
#15 - Jonáš Šerých / @serycjon

05/13/2020 at 08:23AM

20
#16 - 于吉星 / @fishermryn

05/28/2020 at 10:13AM

20
#17 - hepebexè / @hepebexe

01/08/2021 at 09:38PM

20
#18 - A A A / @37fatos

01/21/2021 at 12:57AM

20
#19 - Jung Yeon Park / @park_jungy

01/27/2021 at 09:27PM

20
#20 - Jianfeng / @Jianfen22425058

02/08/2021 at 07:30AM

20
#21 - 김범준 / @kmbmjn

02/17/2021 at 05:00AM

20
#22 - pikjes / @pikjes2

03/21/2021 at 03:38PM

20
#23 - Roman Privalov / @RomanPrivalov

09/19/2021 at 04:18PM

20
#24 - russellzhaomao / @russellzhaomao

05/24/2022 at 08:43AM

20
#25 - Janzen / @__Coos

10/07/2022 at 02:32AM

20
#26 - Aly Thobani / @alythobani

05/30/2024 at 12:43AM

20
#27 - Peppa Pig / @PeppaPi95550250

07/02/2024 at 06:42AM

20
#28 - nickGPT / @nickandbro

08/24/2024 at 01:59PM

21
#29 - BnnGolfer / @BnnGolfer

03/20/2020 at 04:26PM

21
#30 - Moatvald / @moatvald

05/20/2020 at 11:50AM