原vimrc地址:
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"Get out of VI's compatible mode..
set nocompatible "去掉与vi的兼容
"Sets how many lines of history VIM har to remember
set history=400
"Enable filetype plugin
filetype plugin on "支持plugin
filetype indent on
"Set to auto read when a file is changed from the outside
" 在测试的时候只需要重开一个窗口再回来,就已经 autoread 了
set autoread
"Have the mouse enabled all the time:
set mouse=a
"Set mapleader 设置映射键
let mapleader = ","
let g:mapleader = ","
"Fast saving
nmap w :w!
nmap f :find
" 对于这个上面这个映射,我认为去掉作用更大。因为我不知道单单一个find有什么用。
"Fast reloading of the .vimrc
map s :source ~/vim_local/vimrc
"Fast editing of .vimrc
"question 这里的 :e! 和 :e 有什么区别???
"You can use the ':e!' command if you messed up the buffer and want to start all "over again. The ':e' command is only useful if you have changedthe current file "name
map e :e! ~/vim_local/vimrc
"When .vimrc is edited, reload it
"question 这里的autocmd! 和 autocmd 有什么区别??
" When your .vimrc file is sourced twice, the autocommands will appear twiceTo "avoid this, put :autocmd! to .vimrc file
"question 这里的bufwritepost是什么??
" BufWritePost 是把整个缓冲区写回到文件后
autocmd! bufwritepost vimrc source ~/vim_local/vimrc
阅读(382) | 评论(0) | 转发(0) |