dotfiles/zsh/func/init_env_vi
Eryn Wells 11ce2cd5c7 [zsh] Fix up init functions
- Use autoload +X in do_init_functions
- Properly redirect stdout and stderr in do_init_functions and init_env_vi so
  they don't print anything
2022-11-16 15:32:33 +00:00

14 lines
311 B
Bash

#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>
# Prefer nvim and vim, in that order, over standard vi, which is insufferable.
if whence -cp nvim &> /dev/null; then
alias vi=nvim
export EDITOR=nvim
elif whence -cp vim &> /dev/null; then
alias vi=vim
export EDITOR=vim
fi
export editor=vi