From 4e82d1bd1b06d67c51b88c61d221fea9399c6e50 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Thu, 29 Feb 2024 11:13:35 +0000 Subject: [PATCH] Use nvim if installed --- roles/home-cli/files/profile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index 1ed2e17..b02deda 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -222,6 +222,14 @@ else alias vim=vi fi +# Use nvim if installed. +if command -v nvim > /dev/null +then + export EDITOR="nvim -f" + alias vi=nvim + alias vim=nvim +fi + # Use root's cache instead of having one for root and one for the user. if [ "$(id -u)" -ne 0 ] && [ -x /usr/bin/dnf ] then