soates / Auto-Import

vscode extension that will automatically finds, parses and provides code actions for all available imports. Only currently works with files in your folder and TypeScript.
MIT License
165 stars 62 forks source link

Question: Is there a keybinding I can use to initiate the import? #3

Closed Taytay closed 8 years ago

Taytay commented 8 years ago

First: This plugin saved my bacon this weekend. I was migrating a project from namespaces to external modules, and this made it so easy. Thank you!

There might already be a way to do this, but I couldn't find it in my checking of the docs. Is there a keybinding I can use to initiate the lightbulb dropdown? That would speed me up significantly.

soates commented 8 years ago

Haha - I am glad it helped you out mate!

Sadly, I dont think so - this is something a few people have asked and like you, I couldn't find anything in the docs.. definitely worth raising a feature request on the vscode repo!

Taytay commented 8 years ago

Thanks for the quick reply. I'm happy to ask over there. Can you tell me what the "lightbulb" is called in code so that I know what to ask for? Otherwise, I'll ask if there is a keybinding to "show the dropbox for a lightbulb at a given cursor position" but I don't know if that is enough for them to understand what I mean. I thought you might be using a particular feature with a particular name like a "code hint" or "code fix suggestion", etc.

DVuko commented 8 years ago

Have you tried "Ctrl + ."? For me, works like a charm without any configuration.

Taytay commented 8 years ago

Woah @DVuko! You're right! On the Mac, it is CMD + ., and it works like a charm! Thank you!

DVuko commented 8 years ago

You're welcome :) BTW, it's quickFix action "editor.action.quickFix".

soates commented 8 years ago

Wow! your right - thanks for that, ill be updating the readme and giving you both a shoutout :)