I have just setup the nice inverse search feature, from okular
, by using the command gvim --remote-silent +%l %f
as a custom-editor.
It seems to work perfectly fine except a small bug that has been annoying me for the last many hours:
Once the
shift+click
is used inokular
, the cursor in thegvim
window has indeed moved to the right location, but the window-in-focus (or active window, or current window or window-in-selection) has not been shifted togvim
window. I have to manually select the vim window either by mouse or by keyboard shortcuts such asAlt+tab
.
On the other hand its annoying to see that, if I used kile
editor to setup this inverse search, the focus is indeed being shifted to kile
!
Additionally, there was no such problem with forward search, setup from Vim using the instructions to invoke okular by a system call to okular --unique ....
according to these instructions. The focus indeed shifted to okular as expected.
PS: I am on Ubuntu 14.04
gvim
take the focus but the window does not rise? Or does it not take the focus? Either way, this is probably a matter for your window manager and will depend on which one you're using. It may be that you can configure the command to tellgvim
to request focus/rise. But whether that's permitted will still depend on your window manager in the end.