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

Improve parentheses matching #10

Open
kyrylo opened this issue Aug 20, 2012 · 1 comment
Open

Improve parentheses matching #10

kyrylo opened this issue Aug 20, 2012 · 1 comment

Comments

@kyrylo
Copy link
Member

kyrylo commented Aug 20, 2012

First of all, see this comment by @Mon-Ouie:

For the record, there are still things that can be improved:

Properly handling strings, and other things that use the same characters for opening and closing (%w!foo bar!)
Right now, this just inserts a "clear" code after the bracket; one could try checking the ansi codes that currently apply to make sure they aren't cancelled.

Secondly, it would be nice if we had multiline matching. But I'm not sure if that's possible.

pry(main)> def banzai(                                                                                                                              
pry(main)*     :geronimo => true) # This bracket highlights as `coolline_mismatched_paren`.
@Mon-Ouie
Copy link
Member

Multiline matching would require getting history back to the last point where we still had parens open, which doesn't sound impossible; however I don't think we could easily change the color of parns found in previous lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants