From 02909cfe5feb46f5dff1ed432ff2c17b93b167a7 Mon Sep 17 00:00:00 2001 From: xdavidwu Date: Wed, 29 Jun 2022 10:57:40 +0800 Subject: [PATCH] bash: prefer nvim for various variables --- .bash_profile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.bash_profile b/.bash_profile index 3bdaf23..9d1e3a7 100644 --- a/.bash_profile +++ b/.bash_profile @@ -42,7 +42,12 @@ export ABDUCO_SOCKET_DIR="$XDG_DATA_HOME" [ -f /usr/bin/vimpager ] && export PAGER=vimpager export LESS='-S -R' export LESSHISTFILE=- -export EDITOR=vim +if [ -f /usr/bin/nvim ]; then + export EDITOR=nvim + export VIMPAGER_VIM=nvim +else + export EDITOR=vim +fi export DVTM_PAGER=less export ABDUCO_CMD="dvtm -M" export GDK_BACKEND=wayland -- 2.45.2