.vimrc

来源:互联网 发布:国家药监局数据网查询 编辑:程序博客网 时间:2024/06/07 19:51
set nocompatible              " be iMproved, requiredfiletype off                  " required" set the runtime path to include Vundle and initializeset rtp+=~/.vim/bundle/Vundle.vimcall vundle#begin()" " alternatively, pass a path where Vundle should install plugins" "call vundle#begin('~/some/path/here')"" " let Vundle manage Vundle, requiredPlugin 'VundleVim/Vundle.vim'"" " The following are examples of different formats supported." " Keep Plugin commands between vundle#begin/end." " plugin on GitHub repo" Plugin 'tpope/vim-fugitive'" " plugin from http://vim-scripts.org/vim/scripts.html" Plugin 'L9'" " Git plugin not hosted on GitHub" Plugin 'git://git.wincent.com/command-t.git'" " git repos on your local machine (i.e. when working on your own plugin)" Plugin 'file:///home/gmarik/path/to/plugin'" " The sparkup vim script is in a subdirectory of this repo called vim." " Pass the path to set the runtimepath properly." Plugin 'rstacruz/sparkup', {'rtp': 'vim/'}" " Install L9 and avoid a Naming conflict if you've already installed a" " different version somewhere else." Plugin 'ascenator/L9', {'name': 'newL9'}Plugin 'Valloric/YouCompleteMe'" " All of your Plugins must be added before the following linecall vundle#end()            " requiredfiletype plugin indent on    " requiredset nuset syntax=onset tabstop=2" 统一缩进为4set softtabstop=2set shiftwidth=2" 取消自动注释"autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o  " c/c++"set paste  " 取消#"YouCompleteMelet mapleader = ","  " 这个leader就映射为逗号“,”let g:ycm_global_ycm_extra_conf = '~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py'   "配置默认的ycm_extra_conf.py"按,jd 会跳转到定义nnoremap <leader>jj :YcmCompleter GoToDefinitionElseDeclaration<CR>nnoremap <leader>jf :YcmCompleter GoToDefinition<CR>nnoremap <leader>jl :YcmCompleter GoToDeclaration<CR>let g:ycm_confirm_extra_conf=0    "打开vim时不再询问是否加载ycm_extra_conf.py配置"let g:ycm_collect_identifiers_from_tag_files = 1 "使用ctags生成的tags文件"let g:ycm_collect_identifiers_from_tags_files = 1"let g:ycm_key_list_select_completion = ['<S-TAB>', '<C-N>']let g:ycm_key_list_select_completion = ['<TAB>', '<Down>']"let g:ycm_key_list_previous_completion = ['<S-TAB>', '<Up>']let g:ycm_goto_buffer_command = 'vertical-split'set completeopt=menu,longest"let g:ycm_add_preview_to_completeopt = 0let g:ycm_autoclose_preview_window_after_completion = 1let g:ycm_autoclose_preview_window_after_insertion = 1"let g:ycm_open_loclist_on_ycm_diags = 1"let g:ycm_always_populate_location_list = 0let g:ycm_semantic_triggers =  {  \   'c' : ['->', '.'],  \   'cpp,objcpp' : ['->', '.', '::'],  \   'perl' : ['->'],  \   'php' : ['->', '::'],  \ }
0 0
原创粉丝点击