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

Matching bracket/parenthesis highlighting #9

Closed
kyrylo opened this issue Aug 18, 2012 · 1 comment
Closed

Matching bracket/parenthesis highlighting #9

kyrylo opened this issue Aug 18, 2012 · 1 comment

Comments

@kyrylo
Copy link
Member

kyrylo commented Aug 18, 2012

Moved from: pry/pry#283

Description by @jrunning:

A feature I'd love to see in any REPL is IDE-style bracket matching, i.e. as I'm typing or moving the cursor back and forth on the line, if the character under or adjacent to the cursor is a parenthesis or bracket its mate, wherever it is on the line, is highlighted in some way. This would be especially useful when composing and testing complex regular expressions. I don't know how difficult it would be to implement so I don't know how realistic my request is, but it would certainly help set Pry even farther ahead of the pack.

@ghost ghost assigned kyrylo Aug 18, 2012
@Mon-Ouie
Copy link
Member

I added this.

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.

Example of what I mean

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