Monday, December 14, 2009

Re: vim vs gvim -v

On 2009-12-14, Paul wrote:
> On Mon, Dec 14, 2009 at 09:30:48AM -0800, Gary Johnson wrote:
> > diff <(vim --version) <(gvim --version)
> >
> >I suspect that your vim and your gvim are different binaries and
> >that gvim has support for the mouse compiled in whereas vim does
> >not.
>
> My golly, you are right! I'll paste the diff below. I guess I'll
> have to compile with +X11, unless I can start gvim like -v but
> with compatible mode set? I put :set compatible in my .gvimrc and
> started it with 'gvim -v' but it gave a whole load of E errors due
> probably to my other compatible-only settings.

First off, why do you want to set 'compatible'? That will force vim
to behave like vi and may cause you to lose access to some vim
features. Assuming that is what you want to do, though, note that

:help compatible

warns, "If you set this option in your vimrc file, you should
probably put it at the very start." That also means that you should
not put "set compatible" in your .gvimrc as that file is sourced
later in the startup process. See

:help gvimrc
:help startup

Rather than build your own vim with +X11, etc., you could link gvim
to a vim that appears earlier in your PATH than your distribution's
vim, e.g.,

ln -s $(which gvim) ~/bin

You could use a hard link instead, as long as both directories are
on the same file system. I prefer symbolic links for this
application because "ls -l" then shows me the file the link
references.

Regards,
Gary


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: