-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
REPL completions for brackets and quotes. #17838
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
Conversation
FWIW, this is one of the Jupyter notebook features I hate the most...... (p.s. the other one being the multiple input cursor...) |
Hah! Hmm, maybe make it optional then... I like it because it makes is easy to balance brackets. |
And a little more detail about why I hate this feature, (just tried it again to remind myself about it). When the input is |
So it is just the "only move to the right if matching right bracket"-part you dont like? However, it would be annoying if |
Yes, that's the main reason. I can easily imagine that a different heuristic can be annoy in other cases though. Since this is strictly a negative feature for me (I always type matching parentheses/quotes), it'll be pretty hard to implement this that doesn't get in my way from time to time. On the other hand, I agree this is a nice feature and I'll be happy as long as there's a way to turn it off (I'm ok with this being the default if more people like it that way). |
Ok, I will make sure it is easy to enable/disable and then we can think about what should be default. |
e3ab24a
to
292e57d
Compare
Ok, pushed new version with a function to disable it + NEWS entry. |
Also this is only for the Julia REPL now. I could make it the default fall back for all REPLs, not sure what is best. |
292e57d
to
ee8bfc5
Compare
The emoji competition suggests that maybe this should be off by default :P |
end | ||
|
||
# Similar to above but with quotation marks that need to be handled a bit differently | ||
for v in ['\"', '\''] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should matching also apply to back ticks?
This seems to generally not be very desired and is already implemented in a package so probably not needed in the default Base REPL. |
Trying to upstream a bit more from https://github.com/KristofferC/PimpMyREPL.jl
This adds some convenience bracket completions that are common in editors. I basically replicated the behaviour I get from my editor that I like.
Example: