Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

Change default editor to VI in Debian Linux
https://forum.ivorde.com/change-default-editor-to-vi-in-debian-linux-t19724.html
Page 1 of 1

Author:  mandrei99 [ Fri Jan 16, 2015 6:59 pm ]
Post subject:  Change default editor to VI in Debian Linux

Debian (and probably other distros) comes with NANO as it's default editor. For those VIM enthusiasts like me, there are two ways to change the editor:
1. Making use of EDITOR variable in /etc/profile:
Code:
# export EDITOR="vim"


2. Change VIM editor in Debian via "update-alternatives":
Code:
# update-alternatives --config editor
There are 3 choices for the alternative editor (providing /usr/bin/editor).

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

Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/vim.tiny to provide /usr/bin/editor (editor) in manual mode

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/