Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (45 sloc) 1.3 KB
# switch to an easier-to-type prefix
unbind-key C-b
set-option -g prefix 'C-\'
# allow for the escaping of the prefix key
bind-key '\' send-prefix
# more intuitive keybindings for splitting
unbind %
bind - split-window -v
unbind '"'
bind | split-window -h
# set vi keys
setw -g mode-keys vi
# toggle last window like screen
bind-key 'C-\' last-window
# confirm before killing a window or the session
unbind &
bind-key k confirm kill-window
bind-key K confirm kill-session
# open a man page in new window
bind m command-prompt "new-window 'exec man %%'"
# quick view of processes
bind '~' new-window "exec top"
# open irb in new window
bind i new-window -n irb "exec pry --simple-prompt"
# use 256 colors
set -g default-terminal "screen-256color"
# scrollback buffer n lines
set -g history-limit 1000
# use UTF-8
set-window-option -g utf8 on
# make the status bar more useful
set -g status-left " [#S]"
set -g status-right "#(date '+%A %B %d, %H:%M') "
# screen like path behavior for new windows
set -g default-path "$PWD"
# add an export command
bind-key e run-shell "tmux show-buffer | pbcopy"
# setup session, windows, and panes
new-session -n temp -s hacking # temp window has wrong path
new-window -n workspace
swap-window -s workspace -t temp
kill-window -t temp
split-window -h
split-window -v
select-pane -L