First noticed the issue when pasting from the system clipboard stopped working in vim (only when running inside a tmux session). The fix is in the following Stack Overflow answer: http://stackoverflow.com/a/40154047 The necessary wrapper used by the fixed is at: https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard The wrapper can be installed on the Mac with: brew install reattach-to-user-namespace
68 lines
2.1 KiB
Bash
68 lines
2.1 KiB
Bash
#
|
|
# Key bindings
|
|
#
|
|
unbind C-b
|
|
set -g prefix C-a
|
|
|
|
bind | split-window -h
|
|
bind < split-window -h # | without shift on german keyboard
|
|
bind - split-window -v
|
|
bind x kill-pane
|
|
bind X kill-window
|
|
bind r source-file ~/.tmux.conf
|
|
bind . next-window
|
|
bind , previous-window
|
|
bind a send-key C-a # for nested tmux sessions
|
|
bind n command-prompt 'rename-window %%'
|
|
bind N command-prompt 'rename-session %%'
|
|
bind h select-pane -L
|
|
bind j select-pane -D
|
|
bind k select-pane -U
|
|
bind l select-pane -R
|
|
bind -r C-h resize-pane -L 5
|
|
bind -r C-j resize-pane -D 5
|
|
bind -r C-k resize-pane -U 5
|
|
bind -r C-l resize-pane -R 5
|
|
|
|
|
|
#
|
|
# General
|
|
#
|
|
set -g base-index 1 # start window numbering from 1
|
|
set -g default-terminal "screen-256color" # display 256 colors
|
|
set -g history-limit 20000 # remember longer history
|
|
setw -g automatic-rename on # automatically rename windows
|
|
setw -g mouse on # enable mouse support
|
|
setw -g pane-base-index 1 # start pane numbering from 1
|
|
|
|
# Fix for clipboard in vim running inside tmux:
|
|
# See http://stackoverflow.com/a/40154047
|
|
# See https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
|
|
set -g default-command "reattach-to-user-namespace -l $SHELL"
|
|
|
|
#
|
|
# Status bar
|
|
#
|
|
set -g status-left-length 32
|
|
set -g status-right-length 32
|
|
set -g status-justify centre
|
|
set -g status-left ' #S ' # session name
|
|
set -g status-right ' %R %a %d %b ' # time, weekday, day & month
|
|
|
|
#
|
|
# Colors
|
|
#
|
|
# statusbar colors
|
|
set -g status-fg colour4 # Blue
|
|
set -g status-bg colour0 # Base02
|
|
|
|
# window title colors
|
|
setw -g window-status-fg colour12 # Base0
|
|
setw -g window-status-bg default
|
|
setw -g window-status-current-fg colour15 # Base3
|
|
setw -g window-status-current-bg default
|
|
|
|
# pane border
|
|
set -g pane-border-fg colour0 # Base02
|
|
set -g pane-active-border-fg colour9 # Orange
|
|
|