From 0ca8701d462d66b6ad4d5ae2e5ec2ed2f7efc5d9 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Sun, 18 Jan 2026 23:49:17 +0100 Subject: [PATCH] nvim: enforce as default if installed --- shell/aliases.sh | 10 ++++++++-- shell/vars.sh | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/shell/aliases.sh b/shell/aliases.sh index 63784ef..1534ac7 100755 --- a/shell/aliases.sh +++ b/shell/aliases.sh @@ -12,8 +12,14 @@ alias :qa="exit" alias :q!="exit" alias :qw="exit" -alias vim="vim -p" -alias vi="vim -p" +if [ -n "$(type nvim 2>/dev/null)" ]; then + alias vimdiff='nvim -d' + alias vim="nvim -p" + alias vi="nvim -p" +else + alias vim="vim -p" + alias vi="vim -p" +fi alias yt-dlp='yt-dlp -o "%(title)s.%(ext)s"' alias yt-audio='yt-dlp -o "%(title)s.%(ext)s" --extract-audio' diff --git a/shell/vars.sh b/shell/vars.sh index 8c6116e..9e82738 100755 --- a/shell/vars.sh +++ b/shell/vars.sh @@ -1,5 +1,5 @@ #!/bin/sh -export EDITOR=vim -export VISUAL=vim +export EDITOR=nvim +export VISUAL=nvim export BROWSER=firefox