mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
0810857131fb2cc7103dbf26d5ed48d21c151829
When Emacs is launched within Tmux, and a windmove command fails (due to
it reaching the left/right/top/bottom edge of frame, instead trigger a
Tmux pane switch in that direction.
This allows a nearly seamless window/pane switching experience between
Emacs and Tmux.
It does require the following configuration in Tmux to work properly:
# Enable smart pane switching that's Emacs aware.
is_emacs='echo "#{pane_current_command}" | grep -iqE "(^|\/)emacs$"'
# Use Alt-[i/k/j/l] keys without prefix key to switch panes if current pane is
# not running Emacs. If the pane is running Emacs, let Emacs receive the
# keybindings instead.
bind -n M-i if-shell "$is_emacs" "send-keys M-i" "select-pane -U"
bind -n M-k if-shell "$is_emacs" "send-keys M-k" "select-pane -D"
bind -n M-j if-shell "$is_emacs" "send-keys M-j" "select-pane -L"
bind -n M-l if-shell "$is_emacs" "send-keys M-l" "select-pane -R"
bind -T copy-mode M-i if-shell "$is_emacs" "send-keys M-i" "select-pane -U"
bind -T copy-mode M-k if-shell "$is_emacs" "send-keys M-k" "select-pane -D"
bind -T copy-mode M-j if-shell "$is_emacs" "send-keys M-j" "select-pane -L"
bind -T copy-mode M-l if-shell "$is_emacs" "send-keys M-l" "select-pane -R"
bind -T copy-mode-vi M-i if-shell "$is_emacs" "send-keys M-i" "select-pane -U"
bind -T copy-mode-vi M-k if-shell "$is_emacs" "send-keys M-k" "select-pane -D"
bind -T copy-mode-vi M-j if-shell "$is_emacs" "send-keys M-j" "select-pane -L"
bind -T copy-mode-vi M-l if-shell "$is_emacs" "send-keys M-l" "select-pane -R"
jimeh's .emacs.d (a.k.a. Emacs Siren)
This is my personal Emacs config, currently nicknamed Emacs Siren, and heavily inspired by Emacs Prelude.
However, this is not some form of an Emacs starter kit, it's simply my personal config with any quirks, oddities, bugs, and man-eating errors I live with on a daily basis.
Requirements
- Emacs 26.1 or later.
Installation
-
Clone the repo to
~/.emacs.d:git clone git://github.com/jimeh/.emacs.d.git ~/.emacs.d - Launch Emacs and wait a few minutes while it installs all packages.
- Enjoy ^_^
Why not use Emacs Prelude?
Prelude is nice and all, but I don't need everything it does. I need a config that does what I need without having to potentially counter and/or work against some config framework. Hence I prefer rolling my own.
The way Prelude structures it's files and code however is very great, and something I took to heart when I started working on a rewrite of my config, and hence Emacs Siren was born.
Description
My personal Emacs config with any quirks, oddities, bugs, and man-eating errors I live with on a daily basis.
Languages
Emacs Lisp
98.5%
Shell
1%
YASnippet
0.3%
Makefile
0.2%
