一些软件的配置信息,贴于此暂作保留

Gvim

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 =~ '\<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 fileencodings=utf-8,gbk
"设置字体字号
set gfn=monaco:h11
"设置颜色主题
colorscheme zellner
"设置各种情况下的TAB占位
set tabstop=4
set softtabstop=4
set shiftwidth=4
"设置自动缩进
set autoindent
"取消swap备份文件
set noswapfile
"取消文件备份
set nobackup
"设置初始窗口大小
set lines=18 columns=70
"关掉 Menu 和 Toolbar
set guioptions-=m
set guioptions-=T
"F2键监听,被按下可显示或隐藏菜单和Toolbar
map <silent> <F2> :if &guioptions =~# 'T' <Bar>
\set guioptions-=T <Bar>
\set guioptions-=m <bar>
\else <Bar>
\set guioptions+=T <Bar>
\set guioptions+=m <Bar>
\endif<CR>
"打开标签栏
set showtabline=1

你可能感兴趣的:(vi,vim,gvim)