diff --git a/.bashrc b/.bashrc index 4601e1c..a5fcef2 100644 --- a/.bashrc +++ b/.bashrc @@ -49,17 +49,10 @@ HISTFILESIZE=$HISTSIZE HISTCONTROL=ignorespace:ignoredups shopt -s histappend -if command -v nvim > /dev/null; then - success "setting EDITOR to nvim" - export EDITOR=nvim - - success "setting MANPAGER viewer to nvim" - export MANPAGER="nvim +Man!" -else - warn "nvim not found" -fi - # OS specific environment +# +# This should be executed before the tools section, especially if we are using +# tools from Homebrew case "$OSTYPE" in darwin*) # Homebrew @@ -84,6 +77,16 @@ esac # Tools +if command -v nvim > /dev/null; then + success "setting EDITOR to nvim" + export EDITOR=nvim + + success "setting MANPAGER viewer to nvim" + export MANPAGER="nvim +Man!" +else + warn "nvim not found" +fi + # fzf if command -v fzf > /dev/null; then eval "$(fzf "--$(basename "$SHELL")")"