Skip to content

Instantly share code, notes, and snippets.

@milch
Created December 8, 2017 17:41
Show Gist options
  • Save milch/cdf888d70929322fe9de21811455bc99 to your computer and use it in GitHub Desktop.
Save milch/cdf888d70929322fe9de21811455bc99 to your computer and use it in GitHub Desktop.
My tmux config
# Use powerline as bottom bar: https://powerline.readthedocs.io/en/master/installation.html#pip-installation
run-shell "powerline-daemon -q"
source "/usr/local/lib/python3.6/site-packages/powerline/bindings/tmux/powerline.conf"
# reattach-to-user-namespace is necessary for iOS simulator and pbcopy/pbpaste to work from tmux
# also configures tmux to use fish shell
set-option -g default-command 'reattach-to-user-namespace -l fish'
# Enable TrueColor support
set-option -ga terminal-overrides ",xterm-256color:Tc"
# Adjust scrollback history
set-option -g history-limit 30000
# address vim mode switching delay
set -s escape-time 0
# Set prefix to Ctrl+Space
unbind C-b
set -g prefix C-Space
# Pressing Prefix Shift+r reloads tmux config
bind R source-file ~/.tmux.conf \; display-message "config reloaded..."
# VI mode
set -g @shell_mode 'vi'
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
# Mouse support
setw -g mouse on
# Split tmux windows with current directory in the active pane
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Plugins
## Plugin Manager
set -g @plugin 'tmux-plugins/tpm'
## Make tmux work with macOS clipboard
set -g @plugin 'tmux-plugins/tmux-yank'
## Seamlessly navigate between vim and tmux splits
set -g @plugin 'christoomey/vim-tmux-navigator'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment