set fileencodings=utf-8,gbk,ucs-bom,cp936
set encoding=utf-8
set nocompatible
set number
filetype on
set history=1000
syntax on
set autoindent
set smartindent
set showmatch
set guioptions-=T
set vb t_vb=
set ruler
set nohls
:set cindent
set tabstop=4
set shiftwidth=4
set incsearch
set cursorline
source $VIMRUNTIME/ftplugin/man.vim
下面是我windows下gvim中的_vimrc配制文件,很简单
- set nocompatible
-
source $VIMRUNTIME/vimrc_example.vim
-
source $VIMRUNTIME/mswin.vim
-
behave mswin
-
-
-
-
"设定 windows 下 gvim 启动时最大化
-
autocmd GUIEnter * simalt ~x
-
"显示行号
-
set number
-
"设置备份,并且设置备份文件目录
-
set nobackup
-
"set backupdir=C:\Program Files\Vim\Backup
-
-
"高亮显示当前行
-
set cursorline
-
-
-
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 =~ '\
-
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 fileencoding=utf-8
阅读(1055) | 评论(0) | 转发(0) |