Wednesday, May 2, 2012

Re: vim says "No protocol specified" and I have no idea what it means

On 05/02/12 09:03, Kevin O'Gorman wrote:
> This is cool, and I'll try your solution, but I've been working
> this way since Warty. Why is it happening now?

It's the sort of thing you might notice happening, but not the
context in which it was happening. I don't know whether issuing

bash$ su
bash# vim file.txt

behaves differently from

bash$ sudo vim file.txt

or if most of the time you edit as your user and the "I'm editing as
root" feels somewhat random without recognizing it for the
problem-context that it is.

AFAIK, it's happened in Vim-on-*nix as long as I've used it (back in
the late 5.x or early 6.x, about 12 years).

Alternatively, you might have switched from some non-GUI build of
Vim to a GUI build of Vim. The non-GUI version (or rather one built
with "-clipboard" instead of "+clipboard") doesn't display this
behavior, thinking that vim-is-vim-is-vim. Additionally, some
setups come with a minimal vim build by default ("vim-tiny" or
"vim-minimal" in most package managers) that would be built with
"-clipboard", and if you were used to using that and then
unwittingly upgraded to a more featureful version, the behavior
might surprise you.

>>> The same phrase seems to appear randomly over the editing session.
>>
>> Subsequent messages (after startup) _might_ occur under situations I
>> can't readily confirm without reading the source or a good bit of
>> experimentation, but I'd suspect that efforts to read/write from the
>> clipboard registers ("+" and "*"), or perhaps losing and regaining
>> focus might be possible candidates. However, #1 or #2 above should
>> resolve the issue.
>
> Does not sound quite right. In the above session, I entered "ZZ" as
> soon as vim started. So there were no editing or focus events beyond
> the bare minimum. I'm also not sure that I'm using the X clipboards,
> since this is vim, not gvim.

On startup (as my non-X user, omitting "-X" from the command-line),
doing nothing but quitting, I get the aforementioned message
repeated 3x. I don't recall ever getting it "randomly over the
editing session" as well. Those are where I suspect clipboard
registers or focus might be some sort of issue.

The same underlying build is usually used for both vim and gvim,
which detects its proper behavior based on the name by which you
invoke it. So the (non-g)vim will attempt to connect to the
clipboard unless (1) you use -X or (2) you use a build that was
compiled with "-clipboard".

> (I started with vi around 1984, still have my original vi manual from
> AT&T, and have found very little use for a mouse while editing -- I'm
> pretty sure I'm faster with my fingers in "home" position on the
> keyboard at all times.)

I too find little use for the mouse--especially as a laptop user
where the touchpad is less than helpful for most actions.

-Tim




--
You received this message from the "vim_use" 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

No comments:

Post a Comment