how to set vim autoclose bracket without blank?
I'm using gvim7.3 on windows7. When I type "[" or "(" or "{" vim will autoclose them like: "[ | ]" "( | )" "{ | }", "|" is the cursor position. But I 开发者_如何学运维want it autoclose without blanks like: "[|]" "(|)" "{|}", how to set the vim to do this? Thanks.
AutoClose.vim will close braces without putting spaces around the cursor.
Just use
imap [ []<LEFT>
imap ( ()<LEFT>
imap { {}<LEFT>
imap < <><LEFT>
in vimrc. But make sure that there's no spaces after these strings like
imap [ []<LEFT>_
It makes Vim insert additional spaces between brackets.
精彩评论