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

0 comments


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

40 active golfers, 158 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 / @bruiserwins

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

22
#15 - Jon Krause / @jkrause314

11/23/2019 at 04:40PM

22
#16 - Roger Stoltz / @rogsto1

11/24/2019 at 10:24PM

22
#17 - Tinko Minko / @tandikula

11/26/2019 at 05:28PM

22
#18 - James Casey / @hanavi

12/21/2019 at 05:29AM

22
#19 - garry quested / @GQuested

01/15/2020 at 10:04AM

23
#20 - Alexander L. / @Lexol4s

11/28/2019 at 07:07PM

23
#21 - Jason Neylon / @jasonneylon

12/21/2019 at 03:11PM

26
#22 - Dan Kilman / @dan_kilman

12/19/2019 at 06:08PM

27
#23 - Zachary Neubert / @Mr_Saturn16347

11/22/2019 at 10:14PM

27
#24 - Bennett / @bennettbackward

12/29/2019 at 02:37AM

28
#25 - Arijus / @argshook

11/22/2019 at 02:19PM

28
#26 - Mike Harris / @MikeMJHarris

11/22/2019 at 03:26PM

29
#27 - Joren Van Hee / @jorenvanhee

11/22/2019 at 02:37PM

29
#28 - Goshine / @AaronGoshine

11/22/2019 at 04:53PM

29
#29 - Rishabh Dwivedi / @Rishabh45312910

11/23/2019 at 02:36PM

29
#30 - shota_ogswr / @shota_ogasawara

11/24/2019 at 01:10PM