summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2024-07-27 11:15:34 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2024-07-27 11:26:14 +0100
commit3cacfff425c846c2da3208e12e7d2db170232f46 (patch)
tree7a5a317327f647e9ee25badbc15606f462db31d3
parent48603665e56f36e4f757a52cd3ba111ce33a306c (diff)
zsh: Use ‘emacsclient’ when appropriate
-rw-r--r--zsh/rc6
1 files changed, 5 insertions, 1 deletions
diff --git a/zsh/rc b/zsh/rc
index b637184..0a19413 100644
--- a/zsh/rc
+++ b/zsh/rc
@@ -52,7 +52,11 @@ alias spm='swift package'
bindkey -e
-export EDITOR=vim
+if [[ -S ${XDG_RUNTIME_DIR}/emacs/server ]]; then
+ export EDITOR='emacsclient -t'
+else
+ export EDITOR=vim
+fi
export LESSHISTFILE=${XDG_CACHE_HOME}/less_history
export PYTHONSTARTUP=$(dotfiles_root)/python/rc
export SQLITE_HISTORY=${XDG_CACHE_HOME}/sqlite_history