I assumed this behaviour belongs to auto-pairs plugin.

When I type some brackets the cursor is inside in it

enter image description here

When I type the enter key (<CR>) I got this

enter image description here

But what I really want is this

enter image description here

How to change it to desirable behaviour?

  • Do you have auto-pairs installed? Does it work for any other auto-pair features? What do you see if you enter :imap { ? – B Layer Mar 12 '18 at 13:24
  • For sure it's installed and it makes autopairing for [( and etc. It has i { *@<C-R>=AutoPairsInsert('{')<CR> binding. – megas Mar 12 '18 at 15:29
  • 1
    Does :echo g:AutoPairsMapCR return 1? If so then auto-pairs seems okay...unless you have some unrelated mapping or another plugin conflicting with it. You might try disabling all other plugins and use a stripped down, minimal vimrc and see if it works then. – B Layer Mar 12 '18 at 20:25
  • Actually, try :call AutoPairsInit() before you try stripped down vimrc + disabled plugins...see if that helps. – B Layer Mar 12 '18 at 20:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.