New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Opening a file within Notepad++ and jump to line #14579
Comments
I'd guess "no" with the reasoning being today it is that syntax, tomorrow someone wants something slightly different, the next day... The common way to handle such a problem is a batch/cmd/powershell script as an intermediary, taking in the non-Notepad++ syntax and converting to Notepad++ syntax. |
I see the point, however I would argue that this syntax has been around forever (as far as g++3.x, probably beyond).
Is there a way to open a file from within Notepad++ that I'm not aware of? |
Ach...okay, scratch my comment about batch, et al as that was a bit off-base for your original discussion. Sorry for misreading. Let me try to address your concern again.
You can put the caret in the text of the filename and choose Edit > On Selection > Open File But, neither of those recognize any go-to-line-number syntax. What you could do is add some scripting via a scripting plugin. If you'd entertain installing the PythonScript plugin, I'll volunteer to write you a little demo script that would do what you want. |
Good to know! That already saves a bit of selection overhead.
Thanks a lot ! ;) Will close the issue for now. |
Notepad++ uses Windows itself for the File > Open dialog, i.e., need to open a file, turn it over to Windows, Windows responds with a file path. There's not an easy method to insert "non-standard" processing (e.g., handling a colon plus line number on the end) into that. |
The script is HERE as part of a better-than-Notepad++ "open file at caret" command replacement, even though you said:
|
Description of the Issue
Log files (a doxygen error log in my case, but also compiler errors etc) usually contain lines like:
If I have this logfile open in Notepad++ already, I now want to open the
IdentificationData.h
and immediately jump to line 617 -- all within Notepad++.Notepad++ can already do this when run from the command line, although with a different syntax.
Ideally, pasting
C:/dev/IdentificationData.h:617
into the Open-File menu dialog opens the file and jumps to line 617.This should be save on Windows, since colon (:) is not a valid character allowed in filenames (its a different story with many Linux filesystems).
Steps to Reproduce the Issue
Ctrl-o
to open the OpenFile Menu:XX
some line number as suffixExpected Behavior
Opens the file and jumps to line XX
Actual Behavior
Error: Filename is not valid
I would also volunteer to implement this, but first, it would be good to know if this would have a chance to get merged.
The text was updated successfully, but these errors were encountered: