Interact with tmux from Emacs.
emamux.el let emacs interact with tmux. emamux.el is inspired by tslime.vim and vimux.
emamux is available on MELPA and MELPA stable
You can install emamux with the following command.
M-x package-install [RET] emamux [RET]
- Emacs 26 or higher.
- tmux 1.5
Send command to specified target-session(session:window.pane).
Following is emamux:send-command demo with ido completion.
target-session is set as default at first emamux:send-command called.
You can change default target-session with C-u prefix.
Yank from tmux buffer.
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
Run command in a small split pane(runner pane) where emacs is in.
Run last command in runner pane.
Zoom runner runner pane. This command requires tmux 1.8 or higher.
Move into the runner pane and enter the copy mode.
Close runner pane.
Close all other panes in current window.
Interrupt command which is running in runner-pane.
Clear tmux history in runner-pane
Completing read function type. You can choice from 'normal or 'ido, or 'helm.
Orientation of split pane, 'vertical or 'horizonal(Default is 'vertical).
Height of runner-pane(Default is 20).
Use nearest pane as runner pane instead of splitting pane(Default is nil).
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 index
set-option -g status-right '[#h###S:#I:#P]'
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 |
(custom-set-variables
'(emamux:completing-read-type 'helm))- emamux-perl-test a set of commands to easily run perl tests
- emamux-ruby-test a set of commands to easily run ruby tests

