我的vimrc

set nocompatible

set langmenu=en_US
let $LANG= 'en_US'

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 tags=tags
set autochdir

set nu!
colorscheme desert
syntax enable
syntax on
set guifont=courier_new:h12
set shiftwidth=4
set sts=4
set tabstop=4
set expandtab
set nobackup
set fileencodings=ucs-bom,utf-8,gb2312,gbk,cp936,gb18030,big5,euc-jp,euc-kr,latin1,shift-jis
set encoding=utf-8
set termencoding=cp936
language messages zh_CN.UTF-8

syn match cFunction "\<[a-zA-Z_][a-zA-Z_0-9]*\>[^()]*)("me=e-2
syn match cFunction "\<[a-zA-Z_][a-zA-Z_0-9]*\>\s*("me=e-1
hi cFunction gui=NONE guifg=#B5A1FF


filetype off

  set rtp+=$VIM/vimfiles/bundle/Vundle.vim/
  call vundle#rc('$VIM/vimfiles/bundle/')
  Bundle 'VundleVim/Vundle.vim'



filetype plugin indent on

Bundle 'Valloric/YouCompleteMe'
Bundle 'scrooloose/syntastic'
Bundle 'Valloric/ListToggle'
Bundle 'https://github.com/Lokaltog/vim-powerline.git'

Bundle 'taglist.vim'
Bundle 'winmanager'
Bundle 'scrooloose/nerdtree'

filetype plugin indent on

let g:ycm_complete_in_comments=1
let g:ycm_confirm_extra_conf=0
let g:ycm_collect_identifiers_from_tags_files=1
inoremap <leader>; <C-x><C-o>
set completeopt-=preview
let g:ycm_min_num_of_chars_for_completion=1
let g:ycm_cache_omnifunc=0
let g:ycm_seed_identifiers_with_syntax=1
let g:ycm_key_invoke_completion = '<M-;>'
nmap <M-g> :YcmCompleter GoToDefinitionElseDeclaration <C-R>=expand("<cword>")<CR><CR>


"powerline
set laststatus=2
set noshowmode
set t_Co=256

" TagList settings
" increase the width of the taglist window
"let Tlist_WinWidth=20
" 自动打开TagList的window
let Tlist_Auto_Open=0
" 当只剩下Tlist的时候自动关闭
let Tlist_Exit_OnlyWindow=2
" 打开tags用单击
let Tlist_Use_SingleClick=1
" close tag folders for inactive buffers
let Tlist_File_Fold_Auto_Close=1
" show the fold indiactor column in the taglist window
let Tlist_Enable_Fold_Column=1
" 自动更新TagList包含最新编辑的文件
let Tlist_Auto_Update=1
" 显示一个文件的tag
let Tlist_Show_One_File=1
" 在右侧显示窗口
let Tlist_Use_Right_Window=1
" 按照名称排序
let Tlist_Sort_Type="name"
" 让TagList始终解释文件中的tag,不管TagList窗口有没有打开
let Tlist_Process_File_Always=1
" 设置leader键
"nnoremap <leader>tl :TlistToggle<CR>

let g:NERDTree_title='[NERD Tree]'
function! NERDTree_Start()
    exec 'NERDTree'
endfunction
function! NERDTree_IsValid()
    return 1
endfunction

" 设置winmanager
" 设置界面分割
let g:winManagerWindowLayout = "NERDTree|TagList"
"设置winmanager的宽度,默认为25
let g:winManagerWidth=30
"定义打开关闭winmanager快捷键为F8
"nmap <silent> <F8> :WMToggle<cr>
nmap <silent> <F4> :if IsWinManagerVisible() <BAR> WMToggle<CR> <BAR> else <BAR> WMToggle<CR>:q<CR> endif <CR>
"在进入vim时自动打开winmanager
let g:AutoOpenWinManager=0

 

posted @ 2015-12-21 19:51  阳光下的星星cc  阅读(215)  评论(0编辑  收藏  举报