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 the menu and the message English
set langmenu=en_US
let $LANG = "en_US"
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
 
" set background black and font gray
colo koehler
 
" set font as MONACO
set guifont=MONACO:h9:cANSI
 
" set starting window size
set lines=23 columns=130
 
" show line number
set number
 
" set backup directory
let ext = '__'.tr(strpart(bufname(""), 0, strridx(bufname(""), '\')), '\:', '__').'.bak'
let &bex = ext
set backupdir=D:\Program\ Files\Vim\vim73\tmp\
 
" set bash as cygwin's bash
" set shell=D:/cygwin/bin/bash.exe
 
" set Chinese characters in coding correct
set fileencodings=utf-8,gbk,big5
 
 
" Number of spaces to use for each step of (auto)indent.
" set indent as 4 spaces
" set sw=4
set shiftwidth=4
 
" In Insert mode: Use the appropriate number of spaces to insert a <Tab>.
" Spaces are used in indents with the '>' and '<' commands and when
" 'autoindent' is on.
set expandtab
set autoindent
 
" Number of spaces that a <Tab> counts for while performing editing
" operations, like inserting a <Tab> or using <BS>.
set softtabstop=4
 
" enable loading the indent file for specific file types
filetype indent on