I love the fact that I can get the content of vim's search register
from any terminal.

Currently this is doable for nongui-vim with proper setting of the
--servername option and querying it like this:

$ vim --servername foo --remote-expr @/

On the gui version the servername is set automatically when
--servername is not specified which is really nice but I seldom use
gvim.

This is not the case for nongui-vim as documented in the comment in
main.c:prepare_server():

    /*
     * Register for remote command execution with :serversend and --remote
     * unless there was a -X or a --servername '' on the command line.
     * Only register nongui-vim's with an explicit --servername argument.
     * When running as root --servername is also required.
     */

Is there a good reason why the servername is not set by default in
nongui-vim (and when we're running with $DISPLAY available) like it is
for guivim?

My use case that made me want this:

Sometimes I have 5-6 instances of nongui vim open in different
terminals and I would like to quickly do a /usr/bin/grep using the
pattern that is in one of the vim instances' search buffer, from
another terminal.

If the servername was set by default for nongui-vim then I can write a
trivial shell script to iterate through the vim instances I have
running and show its @/ content and from there choose the one I want
to use.

My current workaround to this is to create alias vim='vim --servername
vim' which does not seem that elegant since gvim does the similar
thing without being told to.

The patch to enable this seems trivial but before I go on and patch it
I'd like to know if it would be welcomed.

Thanks,

Nazri

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui