Set the default text editor in Linux

Solution 1: Run the following command

  • select-editor

Solution 2: Set environment variables

  • Add the following variables in ~/.bashrc
    • export EDITOR=vim
    • export VISUAL=vim
  • source ~/.bashrc

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer