diff --git a/init.zsh b/init.zsh index 11d0be8..0b9c756 100644 --- a/init.zsh +++ b/init.zsh @@ -54,14 +54,20 @@ alias xargs='xargs ' cmd_exists sudo && alias sudo='sudo ' cmd_exists doas && alias doas='doas ' -# Neovim stuff +# Emacs and Neovim stuff if [[ -v NVIM ]]; then export EDITOR=nvr alias n=nvr alias nvim=nvr + alias e=nvr +elif [[ -v INSIDE_EMACS ]]; then + export EDITOR='emacsclient' + alias e='emacsclient ' + alias n='emacsclient ' else - export EDITOR=nvim + export EDITOR='emacsclient -nw' alias n=nvim + alias e='emacsclient -nw ' fi export VISUAL="${EDITOR}" alias se=sudoedit