在这里把gVim的配置文件存档,待需时再更新。
Windows版本Gvim配置文件路径:
"{vim安装路径}\_vmrc"
set nocompatible "设置不兼容vi 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 =~ '\<cmd' let cmd = '""' . $VIMRUNTIME . '\diff"' let eq = '"' else let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"' endif else let cmd = $VIMRUNTIME . '\diff' endif silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq endfunction "============================= "Add by Ojumpin, Date:2011-7-3 "============================= set helplang=cn "设置中文帮助 set history=500 "保留历史记录 set guifont=Monaco:h10 "设置字体为Monaco,大小10 set tabstop=4 "设置tab的跳数 set backspace=2 "设置退格键可用 set nu! "设置显示行号 set wrap "设置自动换行 "set nowrap "设置不自动换行 set linebreak "整词换行,与自动换行搭配使用 "set list "显示制表符 set autochdir "自动设置当前目录为正在编辑的目录 set hidden "自动隐藏没有保存的缓冲区,切换buffer时不给出保存当前buffer的提示 set scrolloff=5 "在光标接近底端或顶端时,自动下滚或上滚 "Toggle Menu and Toolbar "隐藏菜单栏和工具栏 "set guioptions-=m "set guioptions-=T set showtabline=2 "设置显是显示标签栏 set autoread "设置当文件在外部被修改,自动更新该文件 set mouse=a "设置在任何模式下鼠标都可用 set nobackup "设置不生成备份文件 "=========================== "查找/替换相关的设置 "=========================== set hlsearch "高亮显示查找结果 set incsearch "增量查找 "=========================== "状态栏的设置 "=========================== set statusline=[%F]%y%r%m%*%=[Line:%l/%L,Column:%c][%p%%] "显示文件名:总行数,总的字符数 set ruler "在编辑过程中,在右下角显示光标位置的状态行 "=========================== "代码设置 "=========================== syntax enable "打开语法高亮 syntax on "打开语法高亮 set showmatch "设置匹配模式,相当于括号匹配 set smartindent "智能对齐 set shiftwidth=4 "换行时,交错使用4个空格 set autoindent "设置自动对齐 set ai! "设置自动缩进