mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
New emacs plugin
This commit is contained in:
parent
3552423de3
commit
970266dba6
1 changed files with 16 additions and 0 deletions
16
plugins/emacs/emacs.plugin.zsh
Normal file
16
plugins/emacs/emacs.plugin.zsh
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
export EMACS_APP="/Applications/Emacs.app"
|
||||||
|
|
||||||
|
# open in background, eventually using running app
|
||||||
|
export EDITOR="open -a $EMACS_APP"
|
||||||
|
|
||||||
|
# always open new app, wait until closed
|
||||||
|
export GIT_EDITOR="open -n -W -a $EMACS_APP"
|
||||||
|
|
||||||
|
alias em="$EDITOR"
|
||||||
|
|
||||||
|
# workaround b/c Emacs can only open already existing files
|
||||||
|
function _emacs_touch_and_edit() {
|
||||||
|
touch $*
|
||||||
|
$EDITOR $*
|
||||||
|
}
|
||||||
|
alias emt=_emacs_touch_and_edit
|
||||||
Loading…
Add table
Add a link
Reference in a new issue