diff --git a/roles/bash/templates/bashrc b/roles/bash/templates/bashrc index 1b73ca5..a8ff7e4 100644 --- a/roles/bash/templates/bashrc +++ b/roles/bash/templates/bashrc @@ -113,3 +113,10 @@ PS1="$yellow\u$reset@$grey\h$reset " # Setup environment variables export PATH=$HOME/.local/bin:$PATH +if command -v nvim > /dev/null; then + export EDITOR=nvim +elif command -v vim > /dev/null; then + export EDITOR=vim +elif command -v vi > /dev/null; then + export EDITOR=vi +fi