Open petetnt opened 7 years ago
Interesting feature @petetnt. I always wanted this feature to be available at least for HTML files. This can be extended to pretty much all language types to ease up the document navigation. I hope someone should pick it up or else we have to start working on it 😊
I might give this a try, seems like a great addition. I'd imagine this would be considered a default extension.. how does LinkParser sound?
I'm thinking not only for require/imports, but even the ability to click on a link in the code, like "github.com". Also, should it be bound to a keybind? I've used editors with a feature like this before, and they used (hold) Ctrl + click. I noticed in Brackets holding the Ctrl key gives you the option to edit multiple spots in the text at once.
@justinrusso that sounds great 👍 Some links are already parsed (like images inline) so that might be good starting point on how to add this feature for code imports and such.
I think the best start would be handling ES6 imports and CommonJS imports in the filesystem and continuing with that.
That'll be useful! Do you know where the image parsing is located? Thanks!
Should npm modules go to npmjs.org or should they link to the src inside node_modules?
This issue is a feature request / extension idea for a OctoLinker like interface for quickly opening files from within JavaScript (or other files).
If you aren't familiar with OctoLinker it works something like this:
Hover over the link part (
"./foo"
,"handlebars"
(optionally while holding a button) and it should appear as clickable linkClick on the link and it
npmjs.com
if it's absolute import (eg. https://www.npmjs.com/package/handlebars)