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 }. Sep 1 '18 at 6:13
  • @WangShidong It's not, } is inserted immediately it's just the reindentation is triggered with delay
    – tga
    Sep 1 '18 at 12:56
  • 1
    I found the problem, it's 'showmatch', if I disabled it the delay is gone, should be a bug?
    – tga
    Sep 1 '18 at 13:02
  • @wengwengweng showmatch is known to cause some delays. I too have disabled it.
    – Ankit Jain
    Sep 4 '18 at 18:00

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, privacy policy and cookie policy

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