diff --git a/dotfiles/bash/.bashrc b/dotfiles/bash/.bashrc index 2e36f7c..143f90a 100644 --- a/dotfiles/bash/.bashrc +++ b/dotfiles/bash/.bashrc @@ -9,7 +9,14 @@ export HISTSIZE=10000 export HISTFILESIZE=10000 export PATH="$HOME/.bin:$PATH" -export EDITOR=vim +# define a default editor +if [ -x "$(command -v caode)" ]; then + export EDITOR=code +elif [ -x "$(command -v vim)" ]; then + export EDITOR=vim +elif [ -x "$(command -v vi)" ]; then + export EDITOR=vi +fi #enable wayland export QT_QPA_PLATFORM=wayland-egl