Last active
April 19, 2018 21:14
-
-
Save timhugh/b39ae27a39c4d3aca4040b38b1e7f911 to your computer and use it in GitHub Desktop.
tmux config
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
# source config | |
bind r source-file ~/.tmux.conf | |
# change command prefix | |
set -g prefix C-a | |
bind C-a send-prefix | |
unbind C-b | |
# no auto-renaming of windows | |
set-option -g allow-rename off | |
# turn on mouse scrolling, etc | |
set -g mouse on | |
# clear pane shortcut | |
# bind -n C-k send-keys -R \; clear-history | |
# increase scrollback buffer size | |
set-option -g history-limit 10000 | |
# proper term settings for vim | |
set -g default-terminal "screen-256color" | |
# open new panes in the same working dir | |
bind % split-window -h -c '#{pane_current_path}' | |
bind '"' split-window -v -c '#{pane_current_path}' | |
# fast pane switching | |
bind -n M-h select-pane -L | |
bind -n M-l select-pane -R | |
bind -n M-k select-pane -U | |
bind -n M-j select-pane -D | |
# allow access to per-user namespace (primarily for clipboard) | |
# (https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard) | |
set-option -g default-command "reattach-to-user-namespace -l bash" | |
# bind-key -T copy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy" | |
unbind -T copy-mode-vi Enter | |
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" | |
# start window numbers at 1 to match keyboard order with tmux window order | |
set -g base-index 1 | |
set-window-option -g pane-base-index 1 | |
# renumber windows sequentially after closing any of them | |
set -g renumber-windows on | |
# remove administrative debris (session name, hostname, time) in status bar | |
set -g status-left '' | |
set -g status-right '' | |
# don't suspend-client | |
unbind-key C-z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist is no longer in use -- check out https://github.com/timhugh/dotfiles for the up-to-date version