NamPNQ / emacs-anywhere

Use. Emacs. Anywhere.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inspired by cknadler/vim-anywhere

What it does

A keyboard shortcut of your choosing creates a temporary frame and buffer. The text is automatically inserted into the application you're using. Bust your moves on the fly, with fewer keystrokes. Invoke the shortcut with selected text and it will be replaced.

Install

OSX

  1. Clone the repo
git clone https://github.com/zachcurry/emacs-anywhere.git
  1. Run the install script from the root of the repo
./install
  1. Open System Preferences and navigate to keyboard > shortcuts > Services. Check the box beside "Emacs Anywhere" and click "Add Shortcut" and key a shortcut.

Linux (alpha)

The Linux implementation requires xdotool be installed. Install as needed.

sudo apt-get xdotool
  1. Clone the repo
git clone https://github.com/zachcurry/emacs-anywhere.git
  1. Run the install script from the root of the repo
./install
  1. Create a keyboard shortcut with this command $HOME/.emacs_anywhere/bin/run

Windows

TBD

How to

Invoke the shortcut. A new frame will be created and display an empty buffer titled *Emacs Anywhere*. When the frame is deleted the buffer's content is inserted into the application you're using and the buffer is deleted. Any text selected when the keyboard shortcut is invoked will be replaced.

Uninstall Emacs Anywhere by running the uninstall script from the root of the repo

./uninstall

Slow?

If your Emacs server isn't running when you use the keyboard shortcut, Emacs Anywhere will start it (this is slower). Run Emacs as a daemon (emacs --daemon) to start your server from the command line, or use server-start command in Emacs. Once you've a got a running server, new frames are created much faster.

TODO

  • Emacs command to toggle Emacs Anywhere
  • Homebrew
  • Windows

Contributing

Have a question? Like the tool? Don't like it? Open an issue and let's talk about it! Pull requests are appreciated!

Copyright © 2018, Zach Curry, All rights reserved.

About

Use. Emacs. Anywhere.

License:MIT License


Languages

Language:Shell 75.2%Language:Emacs Lisp 24.8%