|
From: Stephan R. <li...@st...> - 2007-04-26 23:28:18
|
Am Donnerstag, 26. April 2007 schrieb Morten Omholt Alver:
> > I have just submitted a patch, which adds "push to vim"-support to
> > JabRef. It uses the "vim --remote-send" feature and works fine under X11
> > and Windows. Under Linux, vim needs X11 for communication, so GUI-mode
> > vim or vim in a xterm work (add --servername "foo" for xterm), while it
> > is not possible to connect to a vim-process running on a console.
>
> Stephan,
>
> I haven't looked at your patch yet, but I actually checked in such a
> feature in CVS a while ago. It also uses --remote-send, so it is
> probably more or less equivalent.
Well, I think, I should have had a look at the CVS code ... Yes, the code is
more or less equivalent to mine, except for a few details:
- I send the command "<C-\><C-N>a\cite{foo}" to vim. "<C-\><C-N>" makes vim
enter normal mode like <ESC>, but without making noise, if vim is already in
normal mode. "a" switches (back) to insert mode. This ascertains
that "\cite{foo}" is not interpreted as a command, when you hit the "push to
vim" button, while vim is in nomal mode. - But I don't know too much about
vim, so I am not sure, if this is the most elegant way to do this.
- Path of the vim-Program and name of the vim-server to connect to, can be
configured via the preferences dialog.
- My code does not use special escaping for Windows, but seems to work. At
least on XP. So I assume that your code would produce two backslashes.
(Haven't tested yet.)
Stephan
|