diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-04-21 11:08:16 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-04-21 11:08:16 -0400 |
commit | b087c44642ae8a22a58a3763ea1b595b4be0bc07 (patch) | |
tree | aac868e22e9b828a432625747ff6ceb5ae1e48cc | |
parent | b649a6acf8b5252c821b92083abc136469a2ff8f (diff) |
make emacs work better over ssh
-rw-r--r-- | .config/login.local.sh | 3 | ||||
-rw-r--r-- | .config/selected_editor | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.config/login.local.sh b/.config/login.local.sh index a01f227..d970000 100644 --- a/.config/login.local.sh +++ b/.config/login.local.sh @@ -2,3 +2,6 @@ if [[ $EDITOR = /usr/bin/vi ]]; then unset EDITOR fi +if { [[ $LANG = C ]] || [[ -z $LANG ]]; } && grep '^en_US.UTF-8\s' /etc/locale.gen &>/dev/null; then + export LANG=en_US.UTF-8 +fi diff --git a/.config/selected_editor b/.config/selected_editor index 8330cfe..eec2325 100644 --- a/.config/selected_editor +++ b/.config/selected_editor @@ -1,4 +1,6 @@ -# Generated by /usr/bin/select-editor SELECTED_EDITOR="emacsclient -a '' -c" +if [[ -n $SSH_CONNECTION ]]; then + SELECTED_EDITOR+=" -nw" +fi ALTERNATE_EDITOR='/usr/bin/vim' VISUAL="$SELECTED_EDITOR" |