Non-"vim-tiny"s don't have "compatible" vi's.

Micah Cowan micahcowan at ubuntu.com
Tue May 15 08:30:37 UTC 2007


From https://bugs.launchpad.net/ubuntu/+source/vim/+bug/70569 submitted
by Constantine Evans:

-

When invoked as vi, vim.tiny sources /etc/vim/vimrc.tiny, which sets
compatible so that the vi command runs like the original vi. According
to several people on -devel, this is the desired behaviour for vim when
invoked as vi, and the behaviour makes sense.

However, when another variant of vim, such as vim-full or vim-gnome is
installed, the vi command sources /etc/vim/vimrc, which among other
things sets nocompatible, so, for example, arrow keys work in insert
mode. This is not the intended behaviour.

-
My response:
-

While arrow-key support doesn't bother me particularly, I'd agree that
invoking "vi" should bring up a traditional (compatible) vi. However,
this should probably be discussed on the ubuntu-devel-discuss list, for
the correct solution if not for the desired result.

vim.tiny does what it does only because it has been specifically patched
by Debian to look for /etc/vim/vimrc.tiny when and only when it has been
invoked as vi. None of the other compiled variants of vim (nor, of
course, upstream) have such conditional rc-checking behavior. And I'm
not sure that they should: that seems like the wrong way to go.

Instead, what should possibly happen is that the "vi" alternative should
be linked directly to vim.tiny by default, instead of vim. That way,
installing and update-alternativing a different vim variant would leave
vi still invoking a compatible session.

-
What do y'all think?
-

-- 
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20070515/7ad058d9/attachment.sig>


More information about the Ubuntu-devel-discuss mailing list