Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open file when cursor is anywhere on line #10

Open
akivajgordon opened this issue Apr 27, 2017 · 1 comment
Open

Open file when cursor is anywhere on line #10

akivajgordon opened this issue Apr 27, 2017 · 1 comment

Comments

@akivajgordon
Copy link

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.

@t9md
Copy link
Owner

t9md commented Apr 27, 2017

Yeah, I understand your motivation.
This is exactly what I'm doing in toggle:there in my atom-toggle.

Finding filename like part from line is the difficult part for me, but anyway will give it a shot later.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants