_vimrc配置

set nocompatible
set encoding=utf8
set guioptions-=T

set number
set guifont=consolas:h12

source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim

filetype off
filetype plugin indent on
syntax on

set tabstop=4
set softtabstop=4
set shiftwidth=4
set shiftround
set expandtab

set nobackup
set noswapfile
set nowritebackup

set ignorecase
set smartcase

"set cursorline
set foldmethod=manual

set langmenu=en_US
let $LANG = 'en_US'

set scrolloff=5



autocmd filetype python nnoremap <F5> :w! <bar> exec '!python '.shellescape('%')<CR>
autocmd filetype vb nnoremap <F5> :w! <bar> exec '!wscript '.shellescape('%')<CR>
autocmd filetype java nnoremap <F5> :w!<CR> :!javac %<cr> :!java %:r<cr>

filetype plugin on
let g:pydiction_location = "D:\code_mtl\Pydiction\complete-dict"

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

 

posted @ 2018-01-11 16:33  随便了888  阅读(368)  评论(0编辑  收藏  举报