Created
November 16, 2018 03:03
-
-
Save Chobbes/74fa13cf7ad38f799f5b7cf1c388dcdc to your computer and use it in GitHub Desktop.
emacs tmux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define-prefix-command 'tmux-map) | |
| (global-set-key (kbd "C-o") 'tmux-map) | |
| (defun split-window-right-and-focus () | |
| (interactive) | |
| (select-window (split-window-right))) | |
| (defun split-window-below-and-focus () | |
| (interactive) | |
| (select-window (split-window-below))) | |
| (defun open-eshell-right () | |
| (interactive) | |
| (split-window-right-and-focus) | |
| (eshell t)) | |
| (defun open-eshell-below () | |
| (interactive) | |
| (split-window-below-and-focus) | |
| (eshell t)) | |
| (define-key tmux-map (kbd "%") 'split-window-right-and-focus) | |
| (define-key tmux-map (kbd "\"") 'split-window-right-and-focus) | |
| (define-key tmux-map (kbd "x") 'delete-window) | |
| (define-key tmux-map (kbd "C-o") 'persp-switch-last) | |
| (define-key tmux-map (kbd "c") 'persp-switch) | |
| (define-key tmux-map (kbd ",") 'persp-rename) | |
| ;; Make these hydras? | |
| (define-key tmux-map (kbd "<right>") 'windmove-right) | |
| (define-key tmux-map (kbd "<left>") 'windmove-left) | |
| (define-key tmux-map (kbd "<up>") 'windmove-up) | |
| (define-key tmux-map (kbd "<down>") 'windmove-down) | |
| (windmove-default-keybindings) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Slightly tmuxy emacs bindings.