4 ms·
I've been using paredit with my clojure for a while now and I really love it. But how do I get those multi coloured matched brackets? I've seen them on others s
by retrogradeorbit 12y ago
I've been using paredit with my clojure for a while now and I really love it. But how do I get those multi coloured matched brackets? I've seen them on others screenshots too, but I don't know which mode enables them in my emacs.
Also, I've found with paredit that it keeps the brackets balanced until I paste in a segment of lisp with unmatched brackets. Then it gets in a bind and I need to either disable paredit to manually fix it, or go into overwrite mode to fix it. Is there any graceful way to deal with bad bracket-unmatched code pasting in paredit?
- rafaelsanp 12y agoIt's called rainbow delimiters and I use it with everything. http://www.emacswiki.org/RainbowDelimiters http://www.emacswiki.org/RainbowDelimiters As for the unbalanced delimiters, I just M-x paredit-mode, turn it off, make my fixes (which is easy because rainbow delimiters shows me exactly which delimiter is out of place), and then turn it back on again.
- retrogradeorbit 12y agoThankyou!
- karthink 12y agoAn easier way to deal with unbalanced delimiters without toggling paredit-mode is to use C-q, quoted-insert. C-q ) inserts a literal ) where regular ) is bound to paredit-close-round. Quoted insert is generally useful when you want to enter a specific character that is bound to something other than self-insert, such as a literal newline in a regex pattern.
- adwf 12y agoYep, C-q is also useful when you need to comment out part of a multiline sexp without doing a block select and C-; Otherwise paredit will helpfully move the comment to a newline to avoid breaking the balance ;)