export EDITOR='atom'

if [[ ! "$SSH_TTY" ]]; then
  export EDITOR='mvim'
  export LESSEDIT='mvim ?lm+%lm -- %f'
else
  export EDITOR='vim'
fi

Set default editor to vim/macvim
Set default editor to vim/macvim
