Last active
May 4, 2022 20:19
-
-
Save olexpono/5119c5ffcdb7e5a63d794d7f747f41ef to your computer and use it in GitHub Desktop.
tmux.conf 2017
This file contains 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
# use 256 term for pretty colors | |
set -g default-terminal "xterm-256color" | |
set -g status-bg black | |
set -g status-fg green | |
set-window-option -g clock-mode-colour brightyellow | |
# increase scroll-back history | |
set -g history-limit 1000000 | |
# use vim key bindings | |
setw -g mode-keys vi | |
# enable mouse | |
set -g mouse on | |
# decrease command delay (increases vim responsiveness) | |
set -sg escape-time 0 | |
# increase repeat time for repeatable commands | |
set -g repeat-time 1000 | |
# start window index at 1 | |
set -g base-index 1 | |
# start pane index at 1 | |
setw -g pane-base-index 1 | |
# highlight window when it has new activity | |
setw -g monitor-activity on | |
set -g visual-activity on | |
# re-number windows when one is closed | |
set -g renumber-windows on | |
# enable vi nav and v / V when in copy mode (space == yank) | |
set -g mode-keys vi | |
# enable pbcopy and pbpaste | |
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard/blob/master/README.md | |
set-option -g default-command "reattach-to-user-namespace -l zsh" | |
########################### | |
# Key Bindings | |
########################### | |
# tmux prefix | |
unbind C-b | |
set -g prefix C-f | |
bind-key f send-prefix | |
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" | |
# bind y run-shell "reattach-to-user-namespace -l zsh -c 'tmux show-buffer | pbcopy'" | |
# copy | |
bind [ copy-mode | |
bind ] paste-buffer | |
# buffer | |
bind space choose-buffer | |
# window splitting | |
unbind % | |
bind | split-window -h -c "#{pane_current_path}" | |
unbind '"' | |
bind - split-window -v -c "#{pane_current_path}" | |
# resize panes | |
bind -r H resize-pane -L 5 | |
bind -r J resize-pane -D 5 | |
bind -r K resize-pane -U 5 | |
bind -r L resize-pane -R 5 | |
# create 25% lower split | |
unbind t | |
bind t split-window -v -c "#{pane_current_path}" | |
# quickly switch panes | |
unbind ^F | |
bind ^F select-pane -t :.+ | |
# navigate panes | |
bind -r h select-pane -L | |
bind -r j select-pane -D | |
bind -r k select-pane -U | |
bind -r l select-pane -R | |
# zoom into one pane | |
unbind + | |
bind + \ | |
new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\ | |
swap-pane -s tmux-zoom.0 \;\ | |
select-window -t tmux-zoom | |
unbind - | |
bind - \ | |
last-window \;\ | |
swap-pane -s tmux-zoom.0 \;\ | |
kill-window -t tmux-zoom | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the config!