"F2打开和关闭NERDTree" map <F2> :NERDTreeToggle<CR> let NERDTreeWinSize=30
"YCM配置" let g:ycm_global_ycm_extra_conf='~/.vim/plugged/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py' let g:ycm_add_preview_to_completeopt = 0 let g:ycm_show_diagnostics_ui = 0 let g:ycm_server_log_level = 'info' let g:ycm_min_num_identifier_candidate_chars = 2 let g:ycm_collect_identifiers_from_comments_and_strings = 1 let g:ycm_complete_in_strings=1 let g:ycm_key_invoke_completion = '<c-z>' set completeopt=menu,menuone noremap <c-z> <NOP> let g:ycm_semantic_triggers = { \ 'c,cpp,python,java,go,erlang,perl': ['re!\w{2}'], \ 'cs,lua,javascript': ['re!\w{2}'], \ }
""""""""""""""" "" 通用设置 """"""""""""""" set nocompatible filetype on set t_Co=256 set autoread set autowrite set number syntax on set showcmd set encoding=utf-8 filetype indent on set autoindent set tabstop=4 set shiftwidth=4 set expandtab set softtabstop=4 set hlsearch
"不同模式光标样式" let &t_SI.="\e[5 q" "SI = INSERT mode let &t_SR.="\e[4 q" "SR = REPLACE mode let &t_EI.="\e[1 q" "EI = NORMAL mode (ELSE)
为了使 YCM 能够补全 C++ 标准库中的符号,需要修改~/.vim/plugged/YouCompleteMe/third_party/ycmd/examples/.ycm_extra_conf.py文件中相关的配置(第43行和44行为添加的内容,不同机器上路径不一样,一般都是...../c++/*的路径):