当ultisnips& amp;时,him中的Vim NerdTree文件打开YouCompleteMe

时间:2018-01-22 06:24:36

标签: vim youcompleteme ultisnips

当我开始使用YCM和ultisnips时,我正面临着这个奇怪的问题。所以问题是如果我在NerdTree中选择任何文件,它会按预期在新缓冲区中打开但是If是使用任何YCM + ultisnips在该文件中写入代码。它开始在hsplit中打开而不是正常的缓冲区选项卡。

我的.vimrc

" NERDTree--------------------------------------------------{{{
let g:NERDTreeChDirMode=2
let g:NERDTreeIgnore=['\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__']
let g:NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$']
let g:NERDTreeShowBookmarks=1
let g:nerdtree_tabs_focus_on_files=1
let g:NERDTreeMapOpenInTabSilent = '<RightMouse>'
let g:NERDTreeWinSize = 30
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*.db,*.sqlite

map <silent> - :NERDTreeToggle<CR>
map <Leader> f :NERDTreeFind<CR>
noremap <Leader>0 :NERDTreeFocus<CR> " 
}}}

" Tabs/Buffers--------------------------------------------------{{{
" This allows buffers to be hidden if you've modified a buffer.
" This is almost a must if you wish to use buffers in this way.
set hidden

" To open a new empty buffer
" This replaces :tabnew which I used to bind to this mapping
nmap <leader>T :enew<cr>

" Move to the next buffer
nmap <leader>w :bnext<CR>

" Move to the previous buffer
nmap <leader>q :bprevious<CR>

" Close the current buffer and move to the previous one
" This replicates the idea of closing a tab
nmap <leader>c :bp <BAR> bd #<CR>

" Show all open buffers and their status
nmap <leader>bl :ls<CR>

"}}} 


" Autocompleate--------------------------------------------------{{{
"https://github.com/Valloric/YouCompleteMe.
" make YCM compatible with UltiSnips (using supertab)
let g:ycm_key_list_select_completion = ['<C-n>', '<Down>']
let g:ycm_key_list_previous_completion = ['<C-p>', '<Up>']
let g:SuperTabDefaultCompletionType = '<C-n>'

" better key bindings for UltiSnipsExpandTrigger
let g:UltiSnipsExpandTrigger = "<tab>"
let g:UltiSnipsJumpForwardTrigger = "<tab>"
let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"     
" }}} 

任何帮助都会很棒。谢谢:))

0 个答案:

没有答案