From f02053513ea0985c93d66502418cdb8091434230 Mon Sep 17 00:00:00 2001 From: Quinn Date: Mon, 12 Jan 2026 14:41:52 +0100 Subject: [PATCH] Move PATH and EDITOR configurations above XDG configurations. This prioritises more shell-specific configurations to be earlier. Good for when we add more configurations, such as LANG or HISTSIZE. --- .profile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.profile b/.profile index 3d799b3..d20155f 100644 --- a/.profile +++ b/.profile @@ -6,6 +6,15 @@ # Used to set important variables, such as PATH, XDG_ and alike. # +export PATH=".local/bin:$PATH" + +# Use neovim for editor whenever available. +type nvim >/dev/null && { + export EDITOR='nvim' + export VISUAL='nvim' + export MANPAGER='nvim +Man!' +} + # Read https://specifications.freedesktop.org/basedir-spec/latest/ # or https://wiki.archlinux.org/title/XDG_Base_Directory # for more information about these values. @@ -22,14 +31,6 @@ export XDG_CACHE_HOME="$HOME/.var/cache" # ~/.cache /var/cache [ -L "$HOME/.cache" ] || ln -sf "$XDG_CACHE_HOME" "$HOME/.cache" -export PATH=".local/bin:$PATH" - -if command -v nvim >/dev/null; then - export EDITOR=nvim # use neovim as an editor - export VISUAL=nvim # use neovim for visual-based editors - export MANPAGER='nvim +Man!' # use neovim as a manual pager -fi - # coloured GCC warnings and errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'