Skip to content
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

Make ctrl+q work with @which #40786

Open
antoine-levitt opened this issue May 11, 2021 · 4 comments
Open

Make ctrl+q work with @which #40786

antoine-levitt opened this issue May 11, 2021 · 4 comments
Labels
REPL Julia's REPL (Read Eval Print Loop)

Comments

@antoine-levitt
Copy link
Contributor

Would be useful to have ctrl+q jump to @which definition.

@mgkuhn
Copy link
Contributor

mgkuhn commented May 11, 2021

Can you give a full example of what you mean?

(I.e., doesn't using @edit instead of @which suffice?)

@antoine-levitt
Copy link
Contributor Author

@edit is sufficient, I just think it's very nice to have ctrl+q as a generic "jump to source location", in case someone wants to do this after @which.

@mgkuhn
Copy link
Contributor

mgkuhn commented May 11, 2021

Would the following work for you?

First we make

@which sin(1.0)
edit(ans)

work by adding to InteractiveUtils/src/editless.jl the line

edit(m::Method) = edit(functionloc(m)...)

and then we cause pressing ^Q to call edit(ans) if both the REPL line buffer is empty and typeof(ans) == Method.

@mgkuhn mgkuhn added the REPL Julia's REPL (Read Eval Print Loop) label May 11, 2021
@antoine-levitt
Copy link
Contributor Author

That would be awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

2 participants