Chinaunix首页 | 论坛 | 博客
  • 博客访问: 534872
  • 博文数量: 119
  • 博客积分: 3391
  • 博客等级: 中校
  • 技术积分: 981
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-12 11:49
文章分类

全部博文(119)

文章存档

2014年(3)

2013年(1)

2011年(18)

2010年(27)

2009年(70)

我的朋友

分类: LINUX

2011-08-24 14:07:31

在网上看到一个vim的配置文件,与大家分享一下:

在home目录下建立一个.vimrc文件,用于配置vim各种插件
" 启动vim时窗口的大小
  set lines=45 columns=200  

" 不兼容VI键盘,使用vim键盘
  set nocompatible

" 文件类型识别
  filetype on
  filetype plugin indent on

" 禁止生成临时文件
  set nobackup
  set noswapfile

" 历史记录数
  set history=50

" 设置编码  
  set enc
=utf-8  

" 设置文件编码  
  set fenc=utf-8  

" 设置文件编码检测类型及支持格式  
  set fencs
=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936  

" 设置开启语法高亮  
  syntax on  

" 显示行号  
  set 
number  

" 高亮显示匹配的括号
  set showmatch

" 搜索忽略大小写
  set ignorecase  

" 查找结果高亮度显示  
  set hlsearch
  set incsearch

" tab宽度  
  set tabstop
=4  
  set cindent shiftwidth
=4  
  set autoindent shiftwidth
=4  
  
" 命令行下按tab键自动完成
  set wildmode=list:full
  set wildmenu

" 设置默认的颜色
  colorscheme darkblue
  
" 带有如下符号的单词不要被换行分割
  set iskeyword+=_,$,@,%,#,-
  
" 通过使用: commands命令,告诉我们文件的哪一行被改变过
  set report
=0
  
" 可以在buffer的任何地方使用鼠标(类似office中在工作区双击鼠标定位)
  set mouse=a
  set selection=exclusive
  set selectmode=mouse,key

" 设置自动保存
  imap 
<F9> <Esc>:up<cr>  

" 把 F8 映射到 启动NERDTree插件
  let NERDTreeShowBookmarks = 1
  let NERDChristmasTree = 1
  let NERDTreeWinPos = 
"left"
  map  :NERDTree  

" 在不同的窗口移动
  map 
<C-j> <C-W>j
  map 
<C-k> <C-W>k
  map 
<C-h> <C-W>h
  map 
<C-l> <C-W>l

" 设置FuzzyFinder
  let mapleader = 
"\\"
  map F :FufFile
  map f :FufTaggedFile
  map g :FufTag
  map b :FufBuffer

" 设置Color-Sample
  map 
<silent><F3> :NEXTCOLOR<cr>
  map 
<silent><F2> :PREVCOLOR<cr>

" 设置Rubytest
  let g:rubytest_cmd_spec = 
"rspec -fd %p"

" 设置SuperTab
  let g
:SuperTabRetainCompletionType="context"
阅读(1890) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~