diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 14c2c11..3e17a4c 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -18,7 +18,9 @@ fi # Set preferred editor. # Add Defaults env_keep += "SSH_CONNECTION" to /etc/sudoers.d/ssh_vars -if command -v emacsclient > /dev/null; then +if type nvim >& -; then + VISUAL="$(command -v nvim)" +elif command -v emacsclient > /dev/null; then export EMACS_SOCKET_NAME="${HOME}/.emacs.d/server/server" if pgrep -f "emacs --daemon" > /dev/null; then VISUAL="$(command -v emacsclient) -c"