免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 783 | 回复: 0
打印 上一主题 下一主题

vimrc 之 "General" [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-11 22:14 |只看该作者 |倒序浏览

                原vimrc地址:
http://amix.dk/vim/vimrc.html
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 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
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/103801/showart_2050676.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP