Home

Awesome

Emacs plugin

NOTE: This plugin is forked from ohmyzsh, made plugin-manager agnostic and added few more features.

This plugin utilizes the Emacs daemon capability, allowing the user to quickly open frames, whether they are opened in a terminal via a ssh connection, or X frames opened on the same host. The plugin also provides some aliases for such operations.

NOTE: requires Emacs 24 and newer.

To Install:

# Zplugin
zplugin load flinner/zsh-emacs

# Antigen (not tested)
antigen bundle flinner/zsh-emacs

Aliases

The plugin uses a custom launcher (which we'll call here $EMACS_LAUNCHER) that is just a wrapper around emacsclient.

AliasCommandDescription
emacs$EMACS_LAUNCHER --no-waitOpens a temporary emacsclient frame
eemacsSame as emacs alias
te$EMACS_LAUNCHER -nwOpen terminal emacsclient
eeval$EMACS_LAUNCHER --evalSame as M-x eval but from outside Emacs
magit$EMACS_LAUNCHER --eval (magit)Open emacsclient frame with magit, accepts directory argument
tmagit$EMACS_LAUNCHER -nw --eval (magit)same as magit but opens in terminal
mframeemacsclient --alternate-editor "" --create-frame --eval (magit) --no-waitCreate new X frame with magit, accepts directory argument
eframeemacsclient --alternate-editor "" --create-frameCreate new X frame
efile-Print the path to the file open in the current buffer
ecd-Print the directory of the file open in the the current buffer