GitHub - syohex/emacs-emamux: tmux manipulation from Emacs
source link: https://github.com/syohex/emacs-emamux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
emamux.el
Interact with tmux from Emacs.
Screenshot
Introduction
emamux.el let emacs interact with tmux. emamux.el is inspired by tslime.vim and vimux.
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
- Emacs 24 or higher.
- tmux 1.5
Basic Usage
emamux:send-command
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.
emamux:yank-from-list-buffers
Yank from tmux
buffer.
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
Run command in a small split pane(runner pane
) where emacs is in.
emamux:run-last-command
Run last command in runner pane
.
emamux:zoom-runner
Zoom runner runner pane
. This command requires tmux 1.8 or higher.
emamux:inspect-runner
Move into the runner pane
and enter the copy mode.
emamux:close-runner-pane
Close runner pane
.
emamux:close-panes
Close all other panes in current window.
emamux:interrupt-runner
Interrupt command which is running in runner-pane
.
emamux:clear-runner-history
Clear tmux history in runner-pane
Customize
emamux:completing-read-type
Completing read function type. You can choice from 'normal
or 'ido
, or 'helm
.
emamux:default-orientation
Orientation of split pane, 'vertical or 'horizonal(Default is 'vertical).
emamux:runner-pane-height
Height of runner-pane
(Default is 20).
emamux:use-nearest-pane
Use nearest pane as runner pane
instead of splitting pane(Default is nil).
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 index
set-option -g status-right '[#h###S:#I:#P]'
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
(custom-set-variables '(emamux:completing-read-type 'helm))
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
Recommend
-
335
Welcome to tmux! tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattach...
-
163
dired-k.el dired-k.el highlights dired buffer like k. (This may works only default dired setting) screenshot k.zsh style
-
177
This package is no longer maintained. If you have an issue or pull request, please send it to https://github.com/FelipeLema/emacs-counsel-gtags counsel-gtags.e...
-
152
helm-ag.el Introduction helm-ag.el provides interfaces of The Silver Searcher with helm. Features Support multiple sea...
-
112
README.md helm-gtags.el
-
95
README.md terraform-mode.el
-
74
README.md go-eldoc.el
-
71
README.md anzu.el
-
53
README.md cpp-auto-include.el
-
5
Overview List-manipulation utility functions for Emacs. Quickstart (require 'list-utils) (list-utils-flatten '(1 2 (3 4 (5 6 7)))) ;; '(1 2 3 4 5 6 7) (list-utils-depth '(1 2 (3 4 (5 6 7)))) ;; 3 (let ((...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK