zsh aliases: different emacs alias for linux
This commit is contained in:
parent
332e03010a
commit
72249d6950
21
zsh/aliases
21
zsh/aliases
|
@ -20,14 +20,19 @@ LOGS=/var/log
|
||||||
is-callable 'nvim' && alias vim=nvim
|
is-callable 'nvim' && alias vim=nvim
|
||||||
alias v='vim'
|
alias v='vim'
|
||||||
if is-callable 'emacs'; then
|
if is-callable 'emacs'; then
|
||||||
alias emacs='emacs -nw'
|
if [[ "$OSTYPE" == darwin* ]]; then
|
||||||
e() { # Emacs version of v
|
alias emacs='emacs -nw'
|
||||||
if pgrep Emacs 2>&1 >/dev/null; then
|
e() { # Emacs version of v
|
||||||
emacsclient -n $@
|
if pgrep Emacs 2>&1 >/dev/null; then
|
||||||
else
|
emacsclient -n $@
|
||||||
/Applications/Emacs.app/Contents/MacOS/Emacs $@ &
|
else
|
||||||
fi
|
/Applications/Emacs.app/Contents/MacOS/Emacs $@ &
|
||||||
}
|
fi
|
||||||
|
}
|
||||||
|
else
|
||||||
|
alias e='emacsclient -n'
|
||||||
|
fi
|
||||||
|
|
||||||
ediff() { e --eval "(ediff-files \"$1\" \"$2\")"; }
|
ediff() { e --eval "(ediff-files \"$1\" \"$2\")"; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue