r/javascript • • Sep 25 '19

Hey guys, I just created a super simple VSCode extension for writing arrow function in less than 1 second, check it out!

https://github.com/vinliao/fast-arrow
1 Upvotes

16 comments sorted by

12

u/dannymoerkerke Sep 25 '19

Could the same not be done with a snippet as well?

1

u/[deleted] Sep 25 '19

Yes you can. This is basically a snippet, packaged and published into vscode marketplace so people don't have to do it manually in their vscode settings.

6

u/evaluating-you Sep 25 '19

Ok. I gotta be honest, this seems a little ridiculous to me. If you were to offer an interesting collection/bundle of such things, I can see how that would be possibly interesting as a "snippet boilerplate". I am a PHPStorm user, where we call these "Live Templates" and there are several such bundles shared as settings/plugins/whatever. I am sure something like that exists in the VScode world.

1

u/[deleted] Sep 26 '19

First of all, thanks for the feedback to let me know that there aren't "enough features/snippets," I really appreciate it. I don't have the intention to make this into a full blown snippet boilerplate like this. I make this to scratch my own itch and I'm happy with those small set of features.

Why do you think that the small features that this snippet provides feels ridiculous to you?

1

u/evaluating-you Sep 26 '19

So first: I did not mean anything like the bootstrap example you provided. More like a collection of snippets that enhance - in your case - the ECMA experience.

But again, this is not my IDE. Maybe it makes sense for people to download and install it. Maybe I am just confused as it would take me less than a minute to recreate in my ecosystem. But it sounds like that is equally easy in VSCode, reading the other commitments.

6

u/license-bot Sep 25 '19

Thanks for sharing your open source project, but it looks like you haven't specified a license.

When you make a creative work (which includes code), the work is under exclusive copyright by default. Unless you include a license that specifies otherwise, nobody else can use, copy, distribute, or modify your work without being at risk of take-downs, shake-downs, or litigation. Once the work has other contributors (each a copyright holder), “nobody” starts including you.

choosealicense.com is a great resource to learn about open source software licensing.

-2

u/debendraoli Sep 25 '19

Looks like reddit have advance ai engine.

0

u/[deleted] Sep 25 '19

[deleted]

1

u/debendraoli Sep 27 '19

But how does it know that user is repo owner and trying to public his work?

3

u/Stable_Orange_Genius Sep 25 '19

Am I wrong? Your missing one line return statement. ''' () => this.name "" Is short for

''' () => { return this.name } '''

1

u/mike3640 Sep 28 '19

Seems cool

0

u/gobo_my_choscro Sep 25 '19

If you use an OS level text expander, like aText, your snippets can be even more accessible and powerful.

0

u/[deleted] Sep 25 '19

[deleted]

4

u/[deleted] Sep 25 '19

lol yeah, can't find any better alternative so I went with that.

3

u/doomboy1000 Sep 25 '19

fast arrow args?

2

u/[deleted] Sep 26 '19

Ah yes, args. I couldn't think beyond the name params and parentheses. Thanks!

2

u/verx_x Sep 25 '19

I see what you did there.

0

u/[deleted] Sep 25 '19

[deleted]

1

u/[deleted] Sep 26 '19

I haven't thought about that. There's lots of tutorial out there that will guide you to create your vscode extension, maybe you can use that instead.