Is there’s any config that make mini.pairs smarter? #1691
-
Contributing guidelines
Module(s)mini.pairs QuestionIs there’s any config that make mini.pairs smarter? |
Beta Was this translation helpful? Give feedback.
Answered by
echasnovski
Mar 21, 2025
Replies: 1 comment 2 replies
-
All the information about the module is in its help file. Can you please be more specific? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am afraid this is not possible because 'mini.pairs' only "knows" about cursor's neighborhood when it "makes the decision" about whether to insert the whole pair or not. This is done for performance reasons: having to compute information about whether there is an unbalanced brackets on every key press of bracket's pair has high performance impact.
The best possible behavior here is to insert only a single
{
if there is a}
to the right of cursor. Here is one example of how to do it: