您的位置:首页 > 其它

备份一下vimrc

2011-01-05 16:07 459 查看
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set shiftwidth=4
set tabstop=4
set expandtab
set smarttab
set hlsearch
set incsearch
set ai cin
set nobackup
set statusline=%f%m%r%h%w\ \ \ \ [%{&ff},\ enc=%{&enc},\ fenc=%{&fenc}]\ \ \ \ [%b,\ 0x%B]\ %=[POS\ =\ %l,\ %v]\ \ [%p%%,\ TOTAL\ =\ %L]
set laststatus=2
set bomb
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set gfn=Courier_New:h10
colorscheme my_symfony
set nocompatible " Use Vim defaults (much better!)
set bs=indent,eol,start" allow backspacing over everything in insert mode
"set ai" always set autoindenting on
"set backup" keep a backup file
set viminfo='20,\"50 " read/write a .viminfo file, don't store more
" than 50 lines of registers
set history=50" keep 50 lines of command line history
set ruler" show the cursor position all the time
" Only do this part when compiled with support for autocommands
autocmd BufRead,BufNewFile *.vssettings set ft=xml
autocmd BufRead,BufNewFile *.vcproj set ft=xml
autocmd BufRead,BufNewFile *.log4cxx set ft=cfg
autocmd BufRead,BufNewFile *.ini set ft=cfg
if has("cscope") && filereadable("/usr/bin/cscope")
set csprg=/usr/bin/cscope
set csto=0
set cst
set nocsverb
" add any database in current directory
if filereadable("cscope.out")
cs add cscope.out
" else add database pointed to by environment
elseif $CSCOPE_DB != ""
cs add $CSCOPE_DB
endif
set csverb
endif
" Switch syntax highlighting on, when the terminal has colors
" Also switch on highlighting the last used search pattern.
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
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
au GUIEnter * simalt ~x


opensuse 11.3 tested.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: