atom.io : Open Files via Clickable Links within Javascript Comments

Is there way, in Atom, to open files that are mentioned in comments?

When I edit a code file, there are often other code files of interest that I may want to also open while working on that file. Sometimes these reference files are miles away and require numerous steps of navigation to open them via the left-pane tree structure.

I was thinking, it would be nice if I could put relative file paths into javascript comments in a manner that atom would understand that if I click that path it should open that file in a new tab.

I suspect this isn’t an original idea, so I’m hoping someone can direct me to a solution that enables this type of functionality or make me aware of how it is already enabled but I must use some syntax I’m not currently using.

Add Comment
2 Answer(s)

I value you getting some margin to help me with this task. Without you, no part of this would have been conceivable. You’re the real deal. Lucabet

Answered on December 13, 2022.
Add Comment

I found open-project-file and it seems like a nice fit.

Update: I tested it and it works great! You just click on the relative path (whether it is located in code or comment) and by hitting ctrl-shift-o it immediately opens the file in a new tab within the atom editor.

Answered on July 16, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.