2022-09-29 22:29:13 +00:00
|
|
|
MY_VI="$(type -fP my_vi)"
|
2022-06-09 18:22:39 +00:00
|
|
|
|
2022-07-25 15:20:19 +00:00
|
|
|
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
|
|
|
|
|
2022-06-07 04:41:52 +00:00
|
|
|
if [[ -r "$HOME/.config/_my.emacs/spacemacs/emacs.d/init.el" \
|
2022-09-29 22:29:13 +00:00
|
|
|
&& -n "$(which-command emacsclient)" \
|
|
|
|
&& -n "$(which-command emacs)" \
|
|
|
|
&& -n "$(which-command edit-with-spacemacs)" \
|
|
|
|
]]; then
|
|
|
|
alias my_editor='edit-with-spacemacs'
|
2022-06-04 18:56:36 +00:00
|
|
|
else
|
2022-09-29 22:29:13 +00:00
|
|
|
alias my_editor="${MY_VI} "
|
2022-06-04 18:56:36 +00:00
|
|
|
fi
|
2022-09-29 22:29:13 +00:00
|
|
|
|
|
|
|
alias nvim="${MY_VI} "
|
|
|
|
alias vim="${MY_VI} "
|
|
|
|
alias vi="${MY_VI} "
|
2022-06-04 18:56:36 +00:00
|
|
|
|
2022-06-07 16:34:50 +00:00
|
|
|
alias ed="my_editor"
|
|
|
|
alias edit="my_editor"
|
2022-06-09 18:22:39 +00:00
|
|
|
alias editor="my_editor"
|