automatically insert closing quote

is there an easy way to automatically insert closing quote in a custom language. I tried to implement a PairedBraceMatcher, which works fine for '{}' and '[]'. However using the same technique with quotes  doesn't work. The pairs of quotes are recognized and highlighted but not completed. I also tried to register a QuoteHandler without success. I also wondered because in Settings->Editor->Smart Keys "Insert Pair Quote" is selected what made me think it should work out of the box.
It is not a huge problem but I would be thankful for help to get rid of it.

1 comment
Comment actions Permalink

Indeed the QuoteHandler EP is what is responsible for this behavior, and it is controlled by the "Insert Pair Quote" setting. So, you just need to write one.

A simple one can be made by subclassing

And supplying the the same token type you give to your parser definiton for string tokens. Its a crude solution but works for simple quote characters


Please sign in to leave a comment.