From 3cacfff425c846c2da3208e12e7d2db170232f46 Mon Sep 17 00:00:00 2001 From: Grégoire Duchêne Date: Sat, 27 Jul 2024 11:15:34 +0100 Subject: zsh: Use ‘emacsclient’ when appropriate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zsh/rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'zsh/rc') 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 -- cgit v1.2.3-70-g09d2