smartparens
smartparens copied to clipboard
Pair brackets and parentheses and generally define classes of delimeters that can compliment each other
I use LaTeX to write math. There is syntax to indicate semi-open intervals that often looks like this:
An interval can be denoted as $ J=[a,b) $ or $J=[a,b[$ to indicate that $a\in J$ but $b \notin J$
Is there any way to make this behavior acceptable?
What we support now is shared closing delimiter, for example in ruby you can have pairs like begin..end or if..end or do..end and similar. But we can't do shared opening delimiter.
What we probably could do would be to construct the search predicate to include multiple opening and multiple closing delimiters... but then we would probably only want this to work in some contexts (like the math context in latex).
Well... I can see this would be handy, I'm not sure how much work it would be... but I'm definitely open to the idea.
@guraltsev slightly off-topic, but you can use \intco{...} and \intoc{...} for "mismatched" intervals with the commath package.