Mr Jason

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

syntax on //高亮
set number //设置行数
set showmatch //设置匹配
set history=400 //设置命令记录数量

set tabstop=4
set softtabstop=4
set shiftwidth=4
set autoindent
set cindent
if &term=="xterm"
set t_Co=8
set t_Sb=^[[4%dm
set t_Sf=^[[3%dm
endif
//设置缩进

filetype on
//读取文件类型

filetype plugin indent on
//

:inoremap ( ()<ESC>i
:inoremap ) <c-r>=ClosePair(')')<CR>
:inoremap { {<CR>}<ESC>O
:inoremap } <c-r>=ClosePair('}')<CR>
:inoremap [ []<ESC>i
:inoremap ] <c-r>=ClosePair(']')<CR>
:inoremap " ""<ESC>i
:inoremap ' ''<ESC>i
:inoremap < <><ESC>i

function! ClosePair(char)
if getline('.')[col('.') - 1] == a:char
return "\<Right>"
else
return a:char
endif
endfunction

posted on 2013-04-19 20:10  Mr Jason  阅读(222)  评论(0)    收藏  举报