Chinaunix首页 | 论坛 | 博客
  • 博客访问: 69248
  • 博文数量: 24
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 260
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-03 10:47
文章分类
文章存档

2011年(1)

2010年(1)

2009年(22)

我的朋友

分类: LINUX

2009-09-11 22:14:00

原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

阅读(357) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~