Installing vim.basic - making vi normal again

Nitin Venkatesh's Gravatar

Nitin Venkatesh
published Oct. 5, 2014, 8:24 a.m.

On Debian and other Debian-based distros, when you use Vim, you might find it a little weird. For example, in the insert mode, when you press the arrow keys, you end up with inserting characters - A, B, C and D which gets confusing for people new to the editor (like me). This is because Debian uses the vim.tiny configuration by default.

This can be fixed by getting the vim.basic package and updating the configuration to use it by default.

# Installing vim
$ sudo apt-get install vim

# Updating default vi config
$ sudo update-alternatives --config vi
There are 2 choices for the alternative vi (providing /usr/bin/vi).

  Selection    Path                Priority   Status
  0            /usr/bin/vim.basic   30        auto mode
  1            /usr/bin/vim.basic   30        manual mode
* 2            /usr/bin/vim.tiny    10        manual mode

Press enter to keep the current choice[*], or type selection number: 0
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode

And that's it, you're back to using the vim editor you knew!