Closed AntoineD closed 10 years ago
I thought about that when i was writing GoTo* for python. This should be quite easy to add if @Valloric is okay with it
Is this use case not already handled with the switchbuf
Vim option (see :h switchbuf
for details)? That option determines how Vim opens files. I think it should work for the GoTo* commands as well.
It seems that switchbuf
is correctly respected only when jumping from quickfix list. It does not work when switching buffers with :edit
so it's not supported at the moment
Then we need to support this use case in some way.
+1
+1 Also there is a vim exception traceback in plugin if GoTo* command is ran from an unsaved file. So GoTo* should always open in new tab or split for unsaved buffer, even if user prefers same buffer. One of the ways to cover this: by adding 2 options: g:ycm_goto_try_same_buffer {0, 1} g:ycm_goto_buffer_command {split, hsplit, tabe}
This has actually been implemented for months now; I don't know why the issue wasn't closed. Anyway, docs for the feature are here: https://github.com/Valloric/YouCompleteMe#the-gycm_goto_buffer_command-option
I did not notice it, thanks @davits and @Valloric.
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
jedi-vim allows to choose whether a buffer opens in a tab or a window after a GoTo command, would it be possible to have this feature?