aboutsummaryrefslogtreecommitdiff
path: root/.environment
diff options
context:
space:
mode:
authorRaul Benencia <id@rbenencia.name>2022-11-21 08:51:26 -0300
committerRaul Benencia <id@rbenencia.name>2022-11-21 08:52:01 -0300
commit26080a5af7e343955ee581b105fe5e7c6dc97c6a (patch)
treec5afb2caa3c40ae8cfccb30b13ab93112f2368e6 /.environment
parentb4a2550c01831cbc22a1760e109593e3f31108f7 (diff)
emacs: avoid emacs-in-emacs
Diffstat (limited to '.environment')
-rw-r--r--.environment4
1 files changed, 3 insertions, 1 deletions
diff --git a/.environment b/.environment
index dd61ab8..b0386ce 100644
--- a/.environment
+++ b/.environment
@@ -3,7 +3,9 @@
# Keep it simple and POSIX
# Select an editor.
-if [ -x "`which emacsclient`" ]; then
+if [ -n "$INSIDE_EMACS" ]; then
+ export EDITOR=vim
+elif [ -x "`which emacsclient`" ]; then
export EDITOR="emacsclient -tc --alternate-editor=vi"
else
export EDITOR=vi
nihil fit ex nihilo