原有内容
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\
' . arg3 . eq
endfunction
自己使用的设置
set autoindent
"自动缩进
set ruler
"显示光标位置
set number
"显示行号
set history=50
"设置冒号命令记录条目数
set showcmd
"显示目前正在执行的命令
set incsearch
"打开文本搜索增强
set wrap
"当行超过窗口边沿时自动换行显示(没有插入换行符)
set cmdheight=3
"设置命令行高度为3
colo desert
"设置默认配色方案为desert
filetype plugin indent on
"打开文件类型检测
set lines=40 columns=150
"设置VIM默认长宽
if has("vms")
set nobackup
else
set backup
endif
"备份原有文件
if &t_Co > 2 || has("gui_running") //
syntax on
set hlsearch
endif
"打开高亮功能