http://www.vim.org/download.php#pc
默认安装
C:\Program Files (x86)\Vim
设置环境变量
path: 增加C:\Program Files (x86)\Vim\vim74
PC重启后,在dos下直接vim可运行
配置gvim的配置文件以达到定制C:\Program Files (x86)\Vim\_vimrc
这个文件是默认在gvim开始时自动加载的,但也有不加载的时候,如果不从这加载,需要在家目录中新建一个出来
最好就是屏蔽掉这个文件,用自己的文件set nocompatible syntax on set number "English Characters. set guifont=Consolas:h18:cANSI "For double-width characters "set gfw=kaiti/ 12 colo darkblue "auto indent set ai set ruler "over but not backup set nobackup "highlight when matched set hlsearch "width of tab set tabstop=4 "tab auto indent set shiftwidth=4 "set code collapse set fdm=indent "set code collapse of width set fdc=4 "set windows large set co=80 set lines=50 "set collapse if(has("gui_running")) "set gui config set nowrap set guioptions+=b else "set none gui config set wrap endif set cursorline " unset compatible set nocp " allow plugin filetype plugin on " set support cn "set encoding=UTF-8 "set langmenu=zh_CN.UTF-8 "language message zh_CN.UTF-8 "set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1 "set fileencoding=utf-8 set fenc=utf-8 set fileencodings=ubs-bom,utf-8,cp936,gb2312,18030 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 set bs=eol,start,indent set nu set lines=35 columns=11
有了这个配置文件后,以后开启vim都是有行标记,有颜色等等
参考:
http://www.360doc.com/content/14/0622/17/17791378_388870129.shtml
http://blog.csdn.net/kissmonx/article/details/9995301
http://blog.csdn.net/njnu_mjn/article/details/7935103