Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
2fba4486
Commit
2fba4486
authored
Apr 13, 2011
by
Tristan Carel
Browse files
Add new plugin emacs, to take benefit of daemon capabilities of emacs >=23
parent
bbf1f87e
Changes
2
Show whitespace changes
Inline
Side-by-side
plugins/emacs/emacs.plugin.zsh
0 → 100644
View file @
2fba4486
# Use daemon capabilities of emacs 23
if
"
$ZSH
/tools/require_tool.sh"
emacs 23 2>/dev/null
;
then
export
EDITOR
=
"
$ZSH
/plugins/emacs/emacsclient.sh"
alias
emacs
=
"
$EDITOR
--no-wait"
alias
e
=
emacs
alias
emasc
=
emacs
alias
emcas
=
emacs
# create a new X frame
alias
emacs_frame
=
'emacsclient --alternate-editor "" --create-frame'
fi
plugins/emacs/emacsclient.sh
0 → 100755
View file @
2fba4486
#!/bin/sh
# Starts emacs daemon if not already started.
x
=
`
emacsclient
--alternate-editor
''
--eval
'(x-display-list)'
2>/dev/null
`
if
[
-z
"
$x
"
]
;
then
emacsclient
--alternate-editor
""
--create-frame
$@
else
emacsclient
--alternate-editor
""
$@
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment