my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
2.0 KiB

3 years ago
  1. # Emacs plugin
  2. 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.
  3. - You don't have the cost of starting Emacs all the time anymore
  4. - Opening a file is as fast as Emacs does not have anything else to do.
  5. - You can share opened buffered across opened frames.
  6. - Configuration changes made at runtime are applied to all frames.
  7. **NOTE:** requires Emacs 24 and newer.
  8. To use it, add emacs to the plugins array in your zshrc file:
  9. ```zsh
  10. plugins=(... emacs)
  11. ```
  12. ## Aliases
  13. 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).
  14. | Alias | Command | Description |
  15. |--------|----------------------------------------------------|----------------------------------------------------------------|
  16. | emacs | `$EMACS_LAUNCHER --no-wait` | Opens a temporary emacsclient frame |
  17. | e | `emacs` | Same as emacs alias |
  18. | te | `$EMACS_LAUNCHER -nw` | Open terminal emacsclient |
  19. | eeval | `$EMACS_LAUNCHER --eval` | Same as `M-x eval` but from outside Emacs |
  20. | eframe | `emacsclient --alternate-editor "" --create-frame` | Create new X frame |
  21. | efile | - | Print the path to the file open in the current buffer |
  22. | ecd | - | Print the directory of the file open in the the current buffer |