vim 自动补全括号
sudo vim /usr/share/vim/vimrc ### sudo find / -name '*vimrc' function! AutoPair(open, close) let line = getline('.') if col('.') > strlen(line) || line[col('.') - 1] == ' ' return a:open.a:close."\<ESC>i" else return a:open endif endf function! ClosePair(char) if getline('.')[col('.') - 1] == a:char return "\<Right>" else return a:char endif endf function! SamePair(char) let line = getline('.') if col('.') > strlen(line) || line[col('.') - 1] == ' ' return a:char.a:char."\<ESC>i" elseif line[col('.') - 1] == a:char return "\<Right>" else return a:char endif endf function! RemovePairs() let l:line = getline(".&