-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
allow JULIA_EDITOR to specify how to pass file and line to an editor #2594
Comments
@wlbksy, what else needs to be done here? Once #7108 gets merged, |
@quinnj This is somehow a little different from the command |
Hmmmm......I'm still not quite sure what you're after. Can you give a more concrete example (i.e. the actual command) that you'd like to run? It seems like this may be a good candidate that a few of us could help you write and then whoever wants can stick it in their |
It's in the top post |
The issue is that we only know how to pass a line number to a fixed set of editors. The request is to be able to specify a command template that tells us where to pass the line number, so that this feature works with custom |
The other thing I was just about ot make a PR for was adding in a case for |
I've tried to look for some existing practice of specifying in an environment variable not only the path to another application (e.g., editor, pager, web browser, file explorer) to invoke, but also an entire shell command, including options argument syntax. I couldn't find much so far:
In the case of starting an editor, there is also the question of how to express what to do in case no line number (or column number) is specified, whether lines or columns start at 0 or 1, etc. |
A simple alternative to the Julia user specifying in an environment variable how to pass a line (and column) number on to the application The advantage of doing this via environment variables (as opposed to command-line arguments) is that applications ignore environment variables unknown to them. |
xref https://docs.julialang.org/en/v1/stdlib/InteractiveUtils/#InteractiveUtils.define_editor which might be enough to close this? |
Indeed: the set of editors that work can be extended using |
file2
infunction edit(file::String, line::Integer)
need modificationshould be
file2 = "$JULIA_HOME/../share/julia/base/$file"
However, files in
base/linalg/
andbase/pkg/
cannot be tracked even under this modification.Should figure out a new way to track all the "*.jl" files.
start
ornotepad
, this function would never deal with it.Should add some branch to enable some editors with specific command line syntax , i.e. "notepad++" :
"<bla~bla~bla~>/notepad++ $file -n$line"
The text was updated successfully, but these errors were encountered: