From 0eaee2bc1a297a3fddae522beb1a9f563a047e84 Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 8 Aug 2022 13:14:26 +0200 Subject: [PATCH] set nvim as default editor --- .config/zsh/.zprofile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"