Edit Text Everywhere with Emacs

Published on Oct 4, 2021, by Junji Zhi

Doom Emacs comes with the emacs-everywhere support.

With it, you can edit text anywhere with Emacs.

For example, if you are solving Leetcode questions and want to edit the code with the Almighty Emacs:

emacs-everywhere-demo

To enable it, you uncomment the everywhere app in your Doom init.el.

:app

everywhere ; *leave* Emacs!? You must be joking

In Mac OS X, to invoke the emacs everywhere, I need to set it up as a service. The way to do that is to use Automator, and create a Quick Action:

image

The bash script:

/path/to/emacsclient --eval "(emacs-everywhere)"

Then I assign the hotkey ⌘ + F9 to the service in Keyboard settings:

image

Now whenever I press Command + F9 key in any text area of the browser, a small Emacs window shows up and rescue all my text editing endeavors.