emacsorphanage/emamux
{ "createdAt": "2012-07-11T14:59:40Z", "defaultBranch": "master", "description": "tmux manipulation from Emacs", "fullName": "emacsorphanage/emamux", "homepage": null, "language": "Emacs Lisp", "name": "emamux", "pushedAt": "2021-11-18T00:10:07Z", "stargazersCount": 269, "topics": [], "updatedAt": "2025-08-22T19:58:12Z", "url": "https://github.com/emacsorphanage/emamux"}emamux.el [![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link]
Section titled “emamux.el [![melpa badge][melpa-badge]][melpa-link] [![melpa stable badge][melpa-stable-badge]][melpa-stable-link]”Interact with tmux from Emacs.
Screenshot
Section titled “Screenshot”![emamux_run_command]!(image/run_command_screenshot.png)
Introduction
Section titled “Introduction”emamux.el let emacs interact with tmux. emamux.el is inspired by tslime.vim and vimux.
Installation
Section titled “Installation”emamux is available on MELPA and MELPA stable
You can install emamux with the following command.
M-x package-install [RET] emamux [RET]
Requirements
Section titled “Requirements”- Emacs 24 or higher.
- tmux 1.5
Basic Usage
Section titled “Basic Usage”emamux:send-command
Section titled “emamux:send-command”Send command to specified target-session(session:window.pane).
Following is emamux:send-command demo with ido completion.
![send-command-demo]!(image/send-command-demo.gif)
target-session is set as default at first emamux:send-command called.
You can change default target-session with C-u prefix.
emamux:yank-from-list-buffers
Section titled “emamux:yank-from-list-buffers”Yank from tmux buffer.
emamux:copy-kill-ring
Section titled “emamux:copy-kill-ring”Copy content of (car kill-ring) to tmux buffer
You can change buffer index with Numerical Prefix.
Following commands can be executed only within tmux
emamux:run-command
Section titled “emamux:run-command”Run command in a small split pane(runner pane) where emacs is in.
emamux:run-last-command
Section titled “emamux:run-last-command”Run last command in runner pane.
emamux:zoom-runner
Section titled “emamux:zoom-runner”Zoom runner runner pane. This command requires tmux 1.8 or higher.
emamux:inspect-runner
Section titled “emamux:inspect-runner”Move into the runner pane and enter the copy mode.
emamux:close-runner-pane
Section titled “emamux:close-runner-pane”Close runner pane.
emamux:close-panes
Section titled “emamux:close-panes”Close all other panes in current window.
emamux:interrupt-runner
Section titled “emamux:interrupt-runner”Interrupt command which is running in runner-pane.
emamux:clear-runner-history
Section titled “emamux:clear-runner-history”Clear tmux history in runner-pane
Customize
Section titled “Customize”emamux:completing-read-type
Section titled “emamux:completing-read-type”Completing read function type. You can choice from 'normal or 'ido, or 'helm.
emamux:default-orientation
Section titled “emamux:default-orientation”Orientation of split pane, ‘vertical or ‘horizonal(Default is ‘vertical).
emamux:runner-pane-height
Section titled “emamux:runner-pane-height”Height of runner-pane(Default is 20).
emamux:use-nearest-pane
Section titled “emamux:use-nearest-pane”Use nearest pane as runner pane instead of splitting pane(Default is nil).
tmux configuration
Section titled “tmux configuration”It is useful for using emamux to show session name, window index and
pane index in tmux status bar.
# '#S' is session name, '#I' is window index, '#P' is pane indexset-option -g status-right '[#h###S:#I:#P]'Default keymap
Section titled “Default keymap”emamux defines default keymap. You can use it by following configuration.
;; Bind keymap prefix to Ctrl-z(global-set-key (kbd "C-z") emamux:keymap)Default keymap is as below.
| Key | Command |
|---|---|
| Prefix C-s | emamux:send-command |
| Prefix C-y | emamux:yank-from-list-buffers |
| Prefix M-! | emamux:run-command |
| Prefix M-r | emamux:run-last-command |
| Prefix M-s | emamux:run-region |
| Prefix C-i | emamux:inspect-runner |
| Prefix C-k | emamux:close-panes |
| Prefix C-c | emamux:interrupt-runner |
| Prefix M-k | emamux:clear-runner-history |
| Prefix c | emamux:new-window |
| Prefix C | emamux:clone-current-frame |
| Prefix 2 | emamux:split-window |
| Prefix 3 | emamux:split-window-horizontally |
Sample configuration
Section titled “Sample configuration”(custom-set-variables '(emamux:completing-read-type 'helm))Emamux Applications
Section titled “Emamux Applications”- emamux-perl-test a set of commands to easily run perl tests
- emamux-ruby-test a set of commands to easily run ruby tests
See Also
Section titled “See Also”[melpa-link] !: https://melpa.org/#/emamux [melpa-stable-link] !: https://stable.melpa.org/#/emamux [melpa-badge] !: https://melpa.org/packages/emamux-badge.svg [melpa-stable-badge] !: https://stable.melpa.org/packages/emamux-badge.svg