dotfiles.2022/_home/dot_sz.shrc.d/22_editor.aliases

15 lines
439 B
Plaintext
Raw Normal View History

2022-10-06 02:50:59 +00:00
MY_VI="$(type -fP my_vi || printf "%s -p" $(type -fP nvim) || type -fP vi) "
[[ ! -z "${MY_VI}" ]] \
&& alias my_editor="${MY_VI} " \
&& alias nvim="${MY_VI} " \
&& alias vim="${MY_VI} " \
&& alias vi="${MY_VI} "
[[ -n $(which-command "${EDITOR}") ]] \
&& alias my_editor="${EDITOR} "
2022-06-09 18:22:39 +00:00
2022-10-06 02:50:59 +00:00
[[ -n $(which-command my_editor) ]] \
&& alias ed="my_editor" \
&& alias edit="my_editor" \
&& alias editor="my_editor"