Vim/etc/vim/vimrc
Set Nu "Show line number
Set Novisualbell "Do not blink
The set nocompatible "remove the nasty about VI consistency mode, avoid some bugs and limitations of previous versions
55 "Show Chinese help
If version >= 603
HELPLANG=CN Set
Encoding=utf-8 Set
endif
60 "Map Select all + Copy Ctrl + A
Map <C-A> Ggvgy
map! <C-A> <esc>ggvgy
Map <F12> gg=g
64 "Ctrl + C copy in selected state
Vmap <C-c> "+y
66 "Auto Indent
Autoindent Set
"Set Cindent
69 "Display line number
Set number
71 "Prohibit generation of temporary files
Nobackup Set
Noswapfile Set
"Auto-complete
75:inoremap (() <esc>i
76:inoremap) <c-r>=closepair (') ') <CR>
77:inoremap {{<cr>}<esc>o
78:inoremap} <c-r>=closepair ('} ') <CR>
79:inoremap [[]<esc>i
80:inoremap] <c-r>=closepair ('] ') <CR>
81:inoremap "" "<esc>i
82:inoremap ' <esc>i
function! Closepair (char)
If Getline ('. ') [Col ('. ')-1] = = A:char
"\<right>"
+ Else
A:char return
endif
Endfunction
FileType plugin indent on
Vim Common Configuration