start new:
tmux
start new with session name:
tmux new -s myname
# Set the control character to Ctrl+Spacebar (instead of Ctrl+B) | |
set -g prefix C-space | |
unbind-key C-b | |
bind-key C-space send-prefix | |
# Set new panes to open in current directory | |
bind c new-window -c "#{pane_current_path}" | |
bind '"' split-window -c "#{pane_current_path}" | |
bind % split-window -h -c "#{pane_current_path}" |
# Setting up the colors and copy/paste | |
set -g default-terminal "screen-256color" | |
# This is OS/X specific and should only be enabled when the 'reattach-to-user-namespace' is installed | |
set -g default-command "reattach-to-user-namespace -l /bin/bash" | |
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer" | |
# Make it use C-a, similar to screen.. | |
unbind C-b |