Skip to content

Instantly share code, notes, and snippets.

@alco
Last active August 29, 2015 14:05
Show Gist options
  • Save alco/7e1d94b8a2ece333adc8 to your computer and use it in GitHub Desktop.
Save alco/7e1d94b8a2ece333adc8 to your computer and use it in GitHub Desktop.
λ cat ~/.tmux.conf
# Don't use login shell in tmux
set -g default-command /bin/zsh
# Change default prefix to Ctrl-q
unbind C-b
set -g prefix C-q
# Pane switching with Alt-<arrow> keys
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U \; resize-pane -Z
bind -n M-Down select-pane -D
# Add a binding to toggle status line
bind v set status
# Display tmux session name in the tab title
set-option -g set-titles on
set-option -g set-titles-string "#S:#{pane_current_command}"
# Eliminate ESC key delay
set -sg escape-time 0
# Activity monitoring
setw -g monitor-activity on
set -g visual-activity off
# Disable status line by default
set -g status off
# Enable mouse pane switching
set-option -g mouse-select-pane on
# Toggle mouse scrolling
setw -g mode-mouse on
# Set up proper terminal with 256 colors
set -g default-terminal "screen-256color"
# Highlight active window
set-window-option -g window-status-current-bg yellow
# Set up a shortcut for an env
bind c source-file ~/.tmux/code-term
λ cat ~/.tmux/code-term
# Set up two horizontal panes.
# The one on the bottom is 10 lines high and runs a terminal
# The one on the top can be used to open vim
selectp -t 0 # select the first (0) pane
splitw -v -l 10 # split it into two parts
selectp -t 0 # go back to the first pane
resize-pane -Z # zoom it in
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment