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+clickis used inokular, the cursor in thegvimwindow 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 togvimwindow. 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
gvimtake 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 tellgvimto request focus/rise. But whether that's permitted will still depend on your window manager in the end. – cfr Jul 04 '16 at 14:40