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'