Question

For example, when I have this

function foo() {
  bar()
  }

After I input the last curly brace, vim will unindent it so it matches the indentation level of this function like this:

function foo() {
  bar()
}

However, after I input the curly brace, there is a small lag before vim auto-matches the indentation. Vim first highlights the opening paren, goes back to closing paren, and then unindents it. Since this behaviour looks like pi_paren, I tried turning it off by :NoMatchParen, but nothing changed.

How can I remove this lag?

Was it helpful?

Solution

You can turn off that built-in behavior via

:set noshowmatch

or alternatively try to reduce the 'matchtime' value.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top