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

31 lines
791 B
Plaintext
Raw Normal View History

2022-09-29 22:29:13 +00:00
MY_VI="$(type -fP my_vi)"
2022-06-09 18:22:39 +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
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'
else
2022-09-29 22:29:13 +00:00
alias my_editor="${MY_VI} "
fi
2022-09-29 22:29:13 +00:00
alias nvim="${MY_VI} "
alias vim="${MY_VI} "
alias vi="${MY_VI} "
alias ed="my_editor"
alias edit="my_editor"
2022-06-09 18:22:39 +00:00
alias editor="my_editor"