LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1057|回复: 1

大家交流一下自己的vim配置,看看怎样才能更高效的写程序??(先贴自己的)

[复制链接]
发表于 2003-9-26 15:11:49 | 显示全部楼层 |阅读模式
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

colors darkblue "保护视力很重要
set background=dark
set diffexpr=MyDiff() "自定义比较,就是去除空白跟忽略大小写了
set ic! "搜索的时候忽略大小写
set nu "行号
set cindent shiftwidth=2 "2格缩进
set expandtab "厄,用空格替换掉tab
set sm "showmatch,就是括号匹配了
set filetype=c "厄,某些怪异后缀的文件名
set foldmethod=marker "标记折叠
set path+=c:\ADSv1_2\Include\
set tags=xxxxx,xxxx "多个tags file的路径
function MyDiff()
  let opt = ''
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  silent execute '!D:\tool\editor\vim\vim62\diff -a ' . opt . '"' . v:fname_in . '" "' . v:fname_new . '" > "' . v:fname_out . '"'
endfunction
set autowrite "自动保存
set nobackup "不留~的备份文件
发表于 2003-9-26 18:11:12 | 显示全部楼层
set softtabstop=4
set shiftwidth=4# 缩进为4
syntax on

另外
set nocompatible
colorscheme elflord   #设置theme
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表