Mercurial > dotfiles
diff .shell.d/50.editorsetup.sh @ 463:1a3f8dff1214
editor: if it looks like I'm over ssh, use vi not emacs
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 26 Jun 2017 09:26:59 -0400 |
parents | c911585b7a7b |
children | 7983184eb8d8 |
line wrap: on
line diff
--- a/.shell.d/50.editorsetup.sh +++ b/.shell.d/50.editorsetup.sh @@ -1,4 +1,10 @@ export ALTERNATE_EDITOR=$HOME/unixSoft/otherbin/emacs.sh alias e='emacsclient -n' alias ee='emacsclient' -export EDITOR=emacsclient +if [ -z "$SSH_CONNECTION" ] ; then + # GUI session, use emacsclient + export EDITOR=emacsclient +else + # SSH session + export EDITOR=vi +fi