What is the difference between EDITOR & VISUAL environment variables?



  • They are both to do with editing. EDITOR variable is for setting the non-gui editor. The VISUAL is for setting a full terminal editor.

    EDITOR was traditionally for line editing and VISUAL for full terminal editing.

    Generally VISUAL is used. Many people choose to set them in .bashrc and set them to the same value.

    Commands such as sudo visudo and sudo vipw will not work for your bash environment settings of EDITOR and VISUAL, because the sudo execution environment is not the same. There are other areas to set the default editor for sudo.


Log in to reply
 

© Lightnetics 2024