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.
This commit is contained in:
2026-01-12 14:41:52 +01:00
parent ff2fc8b1f2
commit f02053513e

View File

@@ -6,6 +6,15 @@
# Used to set important variables, such as PATH, XDG_ and alike. # 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/ # Read https://specifications.freedesktop.org/basedir-spec/latest/
# or https://wiki.archlinux.org/title/XDG_Base_Directory # or https://wiki.archlinux.org/title/XDG_Base_Directory
# for more information about these values. # for more information about these values.
@@ -22,14 +31,6 @@ export XDG_CACHE_HOME="$HOME/.var/cache" # ~/.cache /var/cache
[ -L "$HOME/.cache" ] || [ -L "$HOME/.cache" ] ||
ln -sf "$XDG_CACHE_HOME" "$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 # coloured GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'