auto-pairs
auto-pairs copied to clipboard
cannot insert closing brace within nested section.
if I have something like
function(a, b) {
a[b.name] = b.thing;
return a;
}
and I want to add a new statement e.g.
function(a, b) {
if (b) {
a[b.name] = b.thing;
return a;
}
}
when I type if (b) {
and get if (b) {}
, I then delete the }
and move down to insert the closing curly brace, it just auto-jumps to the outer curly brace rather than inserting:
function(a, b) {
if (b) {
a[b.name] = b.thing;
return a;
}|
and I have to insert on the same line as the outer brace and then make a newline and auto-indent to put things back. Is there something I am doing wrong, or is this expected behaviour?
let g:AutoPairsMultilineClose = 0
to turn off the feature.
@jiangmiao This doesn't work if you delete a bracket/brace and then reinsert it, it will automatically jump to the next occurrence of that symbol (even with g:AutoPairsMultilineClose disabled)
Edit:
Both let g:AutoPairsMultilineClose = 0
and let g:AutoPairsFlyMode = 0
have to be 0.
+1 have the same problem here
I had the same issue. Using these lines fixed the issue for me.
let g:AutoPairsMultilineClose = 0
let g:AutoPairsFlyMode = 0
Thanks @jiangmiao and @danihodovic !
+1 have the same problem, and @ivanalejandro0 's solution worked for me.
The g:AutoPairsFlyMode
is default 0, just
let g:AutoPairsMultilineClose = 0
Thanks.
Fly mode is actually a really good feature, it's sad that we have to choose between one of these two feature.