How do i set my environment editor settings?



  • Editors come in two forms, GUI and non-GUI.

    The EDITOR environment variable sets your non-GUI, character-based editor.

    $ export EDITOR=emacs
    

    The VISUAL environment variable sets your GUI editor.

    $ export VISUAL=emacs
    

    Here they are both set to emacs, to demonstrate what happens. Bash attempts to invoke $VISUAL, $EDITOR, and emacs as the editor, in that order.

    If some command requires an editor, for example, "git commit", it will launch the GUI version of emacs, because of the order, the GUI version is used.

    Note: The EDITOR and VISUAL are more global settings, some applications have their own editor settings too, set them as required.


Log in to reply
 

© Lightnetics 2024