Open
Description
I override vi
, vim
, and nvim
with a local version (if available).
The following is the relevant segments from .zshrc
:
export VARERR='Error: Variable is not set.'
export EDITOR="/opt/nvim/bin/nvim"
if [ -x "${EDITOR:-}" ]; then
alias nvim="\${EDITOR:?\${VARERR}}"
alias vim="\${EDITOR:?\${VARERR}}"
alias vi="\${EDITOR:?\${VARERR}}"
fi
If the local nvim
exists, the alias table is set as so:
» whence -va nvim vim vi
nvim is an alias for ${EDITOR:?${VARERR}}
nvim is /usr/bin/nvim
vim is an alias for ${EDITOR:?${VARERR}}
vim is /usr/bin/vim
vi is an alias for ${EDITOR:?${VARERR}}
vi is /usr/bin/vi
This causes zsh-syntax-highlighting
to color vi
in red, erroneously.
If the alias is more "conventional", then it works as expected, coloring vi
in green:
I apologize in advance if this is not expected to work, or if it has already been reported.
I did a cursory search but did not see a similar issue.