Closed j5shi closed 10 years ago
:h g:ycm_goto_buffer_command
I couldn't find g:ycm_goto_buffer_command
on help doc youcompleteme.txt
, strange...I'm using YCM on windows.
though I added let g:ycm_goto_buffer_command = 'new-tab'
to my _vimrc, nothing changed, and I'm using YCM on windows, I'm afriad my YCM is way behind the latest version.
I'm not sure if you have to restart vim. And this feature has been there since March 4th.
EDIT: I'm trying but it seems to be broken. Reopening.
I'm investigating further and it seems that the g:ycm_goto_buffer_command
options is used only when we have to move in a different file. Which is reasonable but I don't know if it is the intended behaviour, so we have to wait for @Valloric.
I'm investigating further and it seems that the g:ycm_goto_buffer_command options is used only when we have to move in a different file. Which is reasonable but I don't know if is the intended behaviour
This is the intended behavior. It's what most people want and adding a conf option to change this isn't worth it.
I know it's a bit old, but the solution is to map multiple commands to one key i.e.:
nnoremap
Now it's even older :smirk: but, in case it's helpful, I found I had to escape the pipe:
nnoremap f :tab split \| YcmCompleter GoToDefinition
We are almost there:
nnoremap f :tab split \| YcmCompleter GoToDefinition<CR>
;-)
Reason may be not in ycm, but in other plugins:
I noticed that jedi-vim takes control over go-to command and after specifying
let g:jedi#use_tabs_not_buffers = 1
all work as expected
Could you please add (or is there) an option to go to definition in a new tab? I found
nnoremap <leader>f :YcmCompleter GoToDefinition<CR>
will open the buffer in the current tab view.