I am using Okular to view LaTeX documents as I am writing them and occasionally compiling. I used to use Evince but I had a lot of trouble setting up forward/reverse searching, which is easy to do in Okular.
For doing forward searching from the text editor (I am using GVim if it is relevant) it is useful to open Okular with the --unique option so that new instances are not continually opened by forward searches.
However, I often have two different documents open in two different workspaces, in two different instances of my text editor. The result is that whichever instance of Okular was opened with --unique first ends up being used for forward search when I call it in either document. This is bad because if document A was called first and I am working on document B in a different workspace, then a forward search called for document B will jump back to the document A window.
It seems like to work around this I need to be able to have multiple windows with "--unique" and have some way of referring to which instance is really the one I want. Is there a way to do this, perhaps with some creative shell scripting? Suggestions of other workarounds would also be appreciated.