open-project-file
Open file under cursor in Atom.
It handles opening:
- files using relative paths:
// /foo/bar.js
import test from './sub/dir/test';
// -> /foo/sub/dir/test.js
- files using default project paths:
// /foo/bar.js
import test from 'sub/dir/test';
// -> /sub/dir/test.js
- files using custom project paths specified in
projects.cson
{
title: "Sample Project"
paths: [
"/path/to/project"
]
prefixPaths: [
"/path/to/other"
]
}
// /path/to/project/foo.js
import test from 'sub/dir/bar';
// -> /path/to/other/sub/dir/bar.js
Useful for projects setting up custom path resolving (e.g. using webpack).
Install
$ apm install project-manager
You can also open Atom and go to Preferences
> Install
and search for open-project-file
Use
Keymaps:
ctrl-shift-o
: Opens file under cursor
Commands:
open-project-file:open
: Opens file under cursor
Credits
Inspired by:
- https://atom.io/packages/open-this
- https://atom.io/packages/open-sesame