diff options
author | Martin Nestorov <mdinestorov@gmail.com> | 2018-10-05 21:43:04 +0300 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-10-05 20:43:04 +0200 |
commit | e09eb23158c7c75b84b7dafb514dcfa86bd06dc3 (patch) | |
tree | 20b4bc6b2582c54a6e06781bf64d567633feecb8 | |
parent | ae548a99733d869f52efa36f146bd020a786a41e (diff) | |
download | zsh-e09eb23158c7c75b84b7dafb514dcfa86bd06dc3.tar.gz zsh-e09eb23158c7c75b84b7dafb514dcfa86bd06dc3.tar.bz2 zsh-e09eb23158c7c75b84b7dafb514dcfa86bd06dc3.zip |
emacs: add README (#7235)
-rw-r--r-- | plugins/emacs/README.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plugins/emacs/README.md b/plugins/emacs/README.md new file mode 100644 index 000000000..c8e33b5ab --- /dev/null +++ b/plugins/emacs/README.md @@ -0,0 +1,30 @@ +# Emacs plugin + +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. + +- You don't have the cost of starting Emacs all the time anymore +- Opening a file is as fast as Emacs does not have anything else to do. +- You can share opened buffered across opened frames. +- Configuration changes made at runtime are applied to all frames. + +**NOTE:** requires Emacs 24 and newer. + +To use it, add emacs to the plugins array in your zshrc file: + +```zsh +plugins=(... emacs) +``` + +## Aliases + +The plugin uses a custom launcher (which we'll call here `$EMACS_LAUNCHER`) that is just a wrapper around [`emacsclient`](https://www.emacswiki.org/emacs/EmacsClient). + +| Alias | Command | Description | +|--------|----------------------------------------------------|----------------------------------------------------------------| +| emacs | `$EMACS_LAUNCHER --no-wait` | Opens a temporary emacsclient frame | +| e | `emacs` | Same as emacs alias | +| te | `$EMACS_LAUNCHER -nw` | Open terminal emacsclient | +| eeval | `$EMACS_LAUNCHER --eval` | Same as `M-x eval` but from outside Emacs | +| eframe | `emacsclient --alternate-editor "" --create-frame` | Create 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 | |