From b087c44642ae8a22a58a3763ea1b595b4be0bc07 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 21 Apr 2014 11:08:16 -0400 Subject: make emacs work better over ssh --- .config/login.local.sh | 3 +++ .config/selected_editor | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to '.config') 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" -- cgit v1.2.3-2-g168b