From df0ff306a439588c22965ac59312f4a627d4dab4 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Mon, 6 Sep 2021 12:43:50 +0200 Subject: [PATCH] [bash]: set EDITOR to (n)vim. --- .bashrc.dotfiles | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.bashrc.dotfiles b/.bashrc.dotfiles index 855797a..5b4cc27 100644 --- a/.bashrc.dotfiles +++ b/.bashrc.dotfiles @@ -38,3 +38,10 @@ if command -v direnv &> /dev/null ; then eval "$(direnv hook bash)" # alias tmux='direnv exec / tmux' fi + +# Set the editor +if command -v nvim &> /dev/null; then + export EDITOR=nvim +elif command -v vim &> /dev/null; then + export EDITOR=vim +fi