unbind-key C-b set-option -g prefix C-p bind-key p send-prefix bind-key C-p last-window setw -g window-status-format "#[bg=blue]#[fg=white]#I #W" setw -g window-status-current-format "#[fg=white,bold]#[bg=cyan]#I #W" set -g window-status-separator ' | ' set -g status-justify left set -g status-fg white set -g status-bg blue set -g status-right '' set -g status-left-length 100 set -g message-command-style "bold,fg=red,bg=blue" set -g message-style "bold,fg=red,bg=blue" set -g automatic-rename off # Greather history set -g history-limit 100000 # New session with prefix + C bind-key C new-session \; command-prompt "rename-session %%" # New window + title bind-key c new-window \; command-prompt "rename-window %%" # Shift arrow to switch windows bind -n S-Left previous-window bind -n S-Right next-window # Move windows with arrow keys bind-key -n C-S-Left swap-window -t -1 bind-key -n C-S-Right swap-window -t +1 # The default command key bindings are: # # [ Enter copy mode to copy text or view the history. # # Function vi emacs # -------- -- ----- # Half page down C-d M-Down # Half page up C-u M-Up # Next page C-f Page down # Previous page C-b Page up # Scroll down C-Down or C-e C-Down # Scroll up C-Up or C-y C-Up # Search again n n # Search again in reverse N N # Search backward ? C-r # Search forward / C-s setw -g mode-keys vi # Toggle mouse on with prefix + m bind m \ set -g mouse on \;\ display 'Mouse: on' # Toggle mouse off with prefix + M bind M \ set -g mouse off \;\ display 'Mouse: off' # Use escape for copy mode unbind [ bind Escape copy-mode # use vi style to select/copy/paste bind-key -T copy-mode-vi v send -X begin-selection bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" bind p paste-buffer # useful to scroll but breaks copy&paste # setw -g mouse on # Scroll with the mouse #bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'" # No delay for escape key press set -sg escape-time 0 # Reload tmux config bind r source-file ~/.tmux.conf # Automatically set window title #set-window-option -g automatic-rename on #set-option -g set-titles on #set -g terminal-overrides 'xterm*:smcup@:rmcup@'