I have several indentkeys (like end, elseif...), all of the works fine but typing } triggers the reindentation with a 1s delay. It behaves the same if I disabled my 'indentexpr' and use 'cindent'.

  • first, you can check if } in insert mode has been mapped, via :imap }.
    – Eric Wong
    Commented Sep 1, 2018 at 6:13
  • @WangShidong It's not, } is inserted immediately it's just the reindentation is triggered with delay
    – tga
    Commented Sep 1, 2018 at 12:56
  • 1
    I found the problem, it's 'showmatch', if I disabled it the delay is gone, should be a bug?
    – tga
    Commented Sep 1, 2018 at 13:02
  • @wengwengweng showmatch is known to cause some delays. I too have disabled it.
    – Ankit Jain
    Commented Sep 4, 2018 at 18:00

1 Answer 1


The delay is caused by 'showmatch' and 'matchtime'

:set noshowmatch or :set matchtime=0 negates the delay.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.