vimrc

set nu

syntax on
set fileencoding=utf-8
set showcmd
set cmdheight=1

set mouse=a
set ignorecase
set hlsearch
set nobackup
set smarttab

set tabstop=4
set softtabstop=4
set shiftwidth=4

set confirm
set autoindent
set cindent
set completeopt=preview,menu

set noeb
set smartindent

:inoremap ( ()i
:inoremap ) =ClosePair(')')
:inoremap { {}O
:inoremap } =ClosePair('}')
:inoremap [ []i
:inoremap ] =ClosePair(']')
:inoremap " ""i
:inoremap ' ''i
function! ClosePair(char)
if getline('.')[col('.') - 1] == a:char
return ""
else
return a:char
endif
endfunction

你可能感兴趣的:(vimrc)