set nvim as default editor

This commit is contained in:
tastytea 2022-08-08 13:14:26 +02:00
parent 00d5db99d8
commit 0eaee2bc1a
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -18,7 +18,9 @@ fi
# Set preferred editor. # Set preferred editor.
# Add Defaults env_keep += "SSH_CONNECTION" to /etc/sudoers.d/ssh_vars # 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" export EMACS_SOCKET_NAME="${HOME}/.emacs.d/server/server"
if pgrep -f "emacs --daemon" > /dev/null; then if pgrep -f "emacs --daemon" > /dev/null; then
VISUAL="$(command -v emacsclient) -c" VISUAL="$(command -v emacsclient) -c"