42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
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} "
|
|
|
|
export DOOMROOT="$HOME/.config/_my.emacs/doom"
|
|
[[ -x $DOOMROOT/emacs.d/bin/doom ]] && function doom() {
|
|
export EMACSDIR="$DOOMROOT/emacs.d"
|
|
export DOOMDIR="$DOOMROOT/config"
|
|
"$EMACSDIR/bin/doom" "${@}"
|
|
|
|
unset EMACSDIR DOOMDIR
|
|
} && function doomemacs() {
|
|
emacs --with-profile=doom ${@}
|
|
} || unset DOOMROOT
|
|
|
|
if [[ -r "$HOME/.config/_my.emacs/spacemacs/emacs.d/init.el" \
|
|
&& -n "$(which-command emacsclient)" \
|
|
&& -n "$(which-command emacs)" \
|
|
&& -n "$(which-command edit-with-spacemacs)" \
|
|
]]; then
|
|
alias my_editor='edit-with-spacemacs'
|
|
fi
|
|
|
|
[[ -n $(which-command my_editor) ]] \
|
|
&& alias ed="my_editor" \
|
|
&& alias edit="my_editor" \
|
|
&& alias editor="my_editor"
|
|
|
|
alias nvim="${MY_VI} "
|
|
alias vim="${MY_VI} "
|
|
alias vi="${MY_VI} "
|
|
|
|
alias ed="my_editor"
|
|
alias edit="my_editor"
|
|
alias editor="my_editor"
|