-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch back focus to vim/neovim after inverse search from Sioyek #2894
Conversation
🤔 I'm not exactly sure what you want here. Can you be more explicit about what was not working and why this fixes it? |
Sorry for not being clear about it. When I set vimtex/autoload/vimtex/view/_template.vim Lines 116 to 118 in a77d14b
The |
Ok; but then I still think this is not quite enough, because vimtex/autoload/vimtex/view/zathura.vim Lines 84 to 91 in a77d14b
There is no similar call to |
Did you test that it works for you with this change? |
I see. I think you're right. This fix works for me just because I added the missing key, but |
Notice that it is much better to include all of the context in a single thread. You are referring to a full other thread. I believe you are thinking about my suggestion here: #2579 (comment), where I suggest adding this: augroup init_vimtex
autocmd!
autocmd User VimtexEventViewReverse call b:vimtex.viewer.xdo_focus_vim()
augroup END But this particular function does not look for |
This is the function we are using: vimtex/autoload/vimtex/view/_template.vim Lines 220 to 222 in a77d14b
The dependencies are only that you have |
Are you planning to support this focus back for sioyek in vimtex, like for zathura? It would be great not to have to add your suggested setting in |
The feature was never really requested (until now), so I've not considered it. I'm a little bit skeptical, because it will only work for people with |
Closed the PR. I think my last question is.. Will your setting work for multiple instances of vimtex? |
Yes, I believe it will work for multiple instances. You should test it, though, as I'm not 100% sure. |
Just FYI, multiple instances don't work. Only one neovim instance receives the inverse search and focus. |
Ok, thanks for the info! |
This PR addresses #2579 by copying
\ 'xwin_id': 0,
line fromzathura.vim
. It wasn't working for me in neovim. becausexwin_id
was missing inb:vimtex.viewer
forsioyek
.