atom-open-this icon indicating copy to clipboard operation
atom-open-this copied to clipboard

Open file when cursor is anywhere on line

Open akivajgordon opened this issue 7 years ago • 1 comments

Currently if my cursor is on the line anywhere but inside the string containing the filename, the file will not open, e.g.:

const foo = re|quire('./foo.js')
//            ^--- cursor here

It would be awesome if the file would open regardless of where the cursor is on that line.

Of course, you might run into an issue if there are multiple paths on the same line, but:

  1. I imagine that is a very rare scenario
  2. that situation could be handled in many ways, including:
    • open the first one on the line (unless cursor is on specific filename)
    • open all files on that line (unless cursor is on specific filename)
    • do nothing (not the worst thing in the world)

This would vastly increase the target area for running this command and makes it much more user friendly, IMO, especially since when browsing files, my cursor would tend to sit in the first column as I navigate up and down each line using the keyboard.

akivajgordon avatar Apr 27 '17 05:04 akivajgordon