弱问vi编辑器的一些设置...
发表于 : 2010-02-01 13:31
怎么实现花括号自动对齐呀?
还有语法加亮功能,我底行模式下键入syntax on,它返回"the command is not available in this version...
还有语法加亮功能,我底行模式下键入syntax on,它返回"the command is not available in this version...
代码: 全选
:inoremap ( ()<ESC>i
:inoremap ) <c-r>=ClosePair(')')<CR>
:inoremap { {}<ESC>i
:inoremap } <c-r>=ClosePair('}')<CR>
:inoremap [ []<ESC>i
:inoremap ] <c-r>=ClosePair(']')<CR>
:inoremap < <><ESC>i
:inoremap > <c-r>=ClosePair('>')<CR>
function ClosePair(char)
if getline('.')[col('.') - 1] == a:char
return "\<Right>"
else
return a:char
endif
endf
:set syntax=on还有语法加亮功能,我底行模式下键入syntax on,它返回"the command is not available in this version...