← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2107647] Re: Drop compatible mode for vim-tiny

 

Cannot reproduce on plucky.

I agree that arrow-keys support is a must. Last time I was forced to use
“hjkl” was in the mid nineties, and only because I was using a minitel
as a makeshift terminal: vi (from Solaris, IIRC) did already support the
arrow keys back then.

That being said, I cannot reproduce your issue:


 1. /etc/vim/vimrc.tiny seems to never be sourced

According to a comment in that file, it is supposed to be sourced by vim
when invoked as ‘vi’. This does not seem to be the case for vim.basic:

    $ sudo update-alternatives --set vi /usr/bin/vim.basic
    $ vi --version | grep 'vimrc file'
       system vimrc file: "/etc/vim/vimrc"
         user vimrc file: "$HOME/.vimrc"
     2nd user vimrc file: "~/.vim/vimrc"
     3rd user vimrc file: "~/.config/vim/vimrc"
    $ vi --clean
    # inside vi:
    :set compatible?  → nocompatible

And not even for vim.tiny:

    $ sudo update-alternatives --set vi /usr/bin/vim.tiny
    $ vi --version | grep 'vimrc file'
    # same list as before
    $ vi --clean
    :set compatible?  → nocompatible

I even ran ‘vi --clean’ under strace: it did not open
/etc/vim/vimrc.tiny .


 2. The arrow keys work reliably

Whether using vim.basic or vim.tiny, whether invoked as ‘vim’ or as
‘vi’, whether ‘compatible’ is set or unset, my arrow keys seem to always
work (gnome-terminal, TERM=xterm-256color).

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to vim in Ubuntu.
https://bugs.launchpad.net/bugs/2107647

Title:
  Drop compatible mode for vim-tiny

Status in vim package in Ubuntu:
  New

Bug description:
  I know I'm opening a can of worms here, but maybe we could drop `set
  compatible` from /etc/vim/vimrc.tiny.

  I think who needs the compatible mode these days knows where it can
  find it and how to enable it, and it's really annoying in a fresh
  installation to get the strange characters when using the arrow keys.

  Possibly 10–15 years ago, it would make sense to have vim-tiny using
  compatible mode, but today we could, and even should, rethink about
  it.

  I know `nano` is the default text editor, but we discuss `vi` a lot in
  technical documentations, so my opinion is we should provide a nice
  experience for the user. I understand `vi` in general isn't a nice
  experience for a beginner user, though, but not using compatible mode
  would be s little less daunting.

  But I'm thinking if there is any tool that would need to invoke `vi`
  in compatible mode, that could cause a problem.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/vim/+bug/2107647/+subscriptions