diff options
| author | Ahmed Abdelhalim <[email protected]> | 2024-03-26 13:26:47 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2024-03-26 13:26:47 +0100 |
| commit | 2610fa0dd1a05746e2a08ab940cbf9355bc6ed17 (patch) | |
| tree | 03673e7153a80f9e4ffc1a76c4baa88be5d8d40d | |
| parent | d54cd11a56e33af8cf97a3188e25ef2ad7c73645 (diff) | |
Update tmux configuration and use vim navigation instead of ctrl
| -rw-r--r-- | .tmux.conf | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -4,8 +4,10 @@ set-option -g allow-rename off # Don't allow pane automatic renaming set-option -g mouse on # mouse behavior set-option -g base-index 1 # start indexing from 1 not 0 set-option -g pane-base-index 1 # start indexing from 1 not 0 +set-option -g renumber-windows on # renumber the windows after closing windows set-option -g history-limit 10000 # Scroll History limit -set-option -g display-time 4000 # messages are displayed for 4 seconds +set-option -g display-time 4000 # window/status messages are displayed for 4 seconds +set-option -g display-panes-time 4000 # pane messages are displayed for 4 seconds set-option -g focus-events on # focus events enabled for terminals that support them set-option -g status-keys emacs # emacs binding status commands: https://unix.stackexchange.com/questions/383420/ @@ -18,19 +20,21 @@ bind-key -T copy-mode-vi 'y' send-keys -X copy-selection-and-cancel bind-key -n C-k clear-history # Resizing panes -bind-key -r h resize-pane -L 5 -bind-key -r j resize-pane -D 5 -bind-key -r k resize-pane -U 5 -bind-key -r l resize-pane -R 5 +bind-key -r H resize-pane -L 5 +bind-key -r J resize-pane -D 5 +bind-key -r K resize-pane -U 5 +bind-key -r L resize-pane -R 5 -# Switch pane with Ctrl+Arrow (instead of prefix Ctrl+Arrow) -# This is conflicting with MacOS keyboard shortcuts (System Preferences > Keyboard > Shortcuts > Mission Control) -# move space left/move space right are disabled as well as Mission Control and Application windows shortcuts -# in System Preferences > Mission Control > Keyboard and Mouse shortcuts -bind-key -T root C-Up select-pane -U -bind-key -T root C-Down select-pane -D -bind-key -T root C-Left select-pane -L -bind-key -T root C-right select-pane -R +# Vim style pane navigation +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R # Load OSX specific configurations to add (fix copy) if-shell 'test "$(uname)" = "Darwin"' 'source ~/.tmux-osx.conf' + +# For better tmux support disable MacOS conflicting settings (to work better with control + arrows): +# System Preferences > Keyboard > Shortcuts > Mission Control +# System Preferences > Keyboard > Shortcuts > Mission Control > move (left | right) a space +# System Preferences > Keyboard > Shortcuts > Application windows |
