tagbar icon indicating copy to clipboard operation
tagbar copied to clipboard

Jump in current split

Open PhML opened this issue 8 years ago • 4 comments

When I work with a split window of the same file, let's say a vertical split, a jump to tag definition is always done in the left split while I am in the right one and I expect to jump in this one.

PhML avatar Nov 24 '16 12:11 PhML

I can't reproduce this. When you jump from the Tagbar window to a tag it should always try the previous window first, which in your case should be the right one. How exactly are you jumping to the Tagbar window? Do you have any other windows open?

majutsushi avatar Dec 10 '16 06:12 majutsushi

I open the Tagbar window with this mapping: nnoremap <silent> <F3> :TagbarToggle<CR>

nmap doesn't work.

I use neovim and on a fresh installation, with this minimal setup it works:

execute pathogen#infect()
syntax on
filetype plugin indent on

nnoremap <silent> <F3> :TagbarToggle<CR>
" TagBar{{{
let g:tagbar_left = 1
let g:tagbar_autoclose = 1
let g:tagbar_autofocus = 1
"}}}
set splitright

So, I suppose there is a conflict somewhere with my full configuration and plugins. But I don't see which one. It works in my full configuration if I disable tagbar_autoclose AND tagbar_autofocus.

PhML avatar Dec 12 '16 10:12 PhML

I just tried it with your settings, and it's still working fine for me. So there does seem to be some interference from one of your plugins (or settings). Unfortunately I don't think I can help with tracking that down myself, you're just going to have to experiment. Once you've found what's causing it we can determine what exactly is doing the wrong thing here.

majutsushi avatar Dec 18 '16 06:12 majutsushi

Does Tagbar normally read tags of the current viewport selected ? For example, on my side, if i split vim window in two or more viewport with a different buffre file inisde, and then open TagbarToggle, Tagbar show me tags of the current viewport. But if i change ocus viewport, Tagbat stay on the first one and i not find how to change Tagbar focus viewport tags. Is this normal ?

jerome-diver avatar Jul 17 '17 03:07 jerome-diver