-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
76 lines (60 loc) · 3.08 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# FUTURE - here is an interesting .tmux.conf
# https://gist.github.com/spicycode/1229612
# some more interesting stuff
# http://danielallendeutsch.com/blog/16-using-tmux-properly.html
# consider customizing the bar
# master copy/paste mode
# macos: use the right bash!
# is this necessary since iterm now specifies the right bash? YES
# from: http://octuplus.co/Detalles/31912/How-to-write-if-statement-in--tmux-conf-to-set-different-options-for-different-tmux-versions-
if-shell "if [[ `uname` == 'Darwin' ]]; then true; else false; fi" "set-option -g default-shell /usr/local/bin/bash"
# Start window and pane indexing at 1 because 1 is the far left physical keyboard number.
set -g base-index 1
setw -g pane-base-index 1
set-option -g history-limit 8000
# persistently bind all new windows to PWD
# c = create, " = new vertical split, % = new horizontal split
# http://unix.stackexchange.com/a/109453/106262
bind-key c new-window -c "#{pane_current_path}"
bind-key '"' split-window -c "#{pane_current_path}"
bind-key '%' split-window -h -c "#{pane_current_path}"
# also allow C-a prefix because it's much more sane than C-b when constantly switching
# but it does overwrite the vim C-a increment... touch choices...
#set-option -g prefix C-a
#bind-key C-a send-prefix
# currently off until i have an issue, ALL 256 COLOR DRIVEN BY THE `tmux -2` FLAG
# need 256 colors, especially for vim
# This apparently works on some machines... on ubuntu desktop i need to use the `tmux -2` flag.
# set -g default-terminal "xterm-256color"
# set -g default-terminal "tmux"
#
# NOTE: Some tmux special behavior is defined in .bashrc
# Notably, the bash command `tmux` will open a
# session that already exists, if one exists. Otherwise
# it opens a new session.
# http://unix.stackexchange.com/a/103956
# This command enables the behavior in bash. It's a little hard to follow.
# `tmux` is effectively a bash function, IIRC. Maybe clean it up later if possible.
new-session -n $HOST
# necessary for evil-mode emacs, apparently should be 20+ for localhost and up to 500ms for remote
# according to stack overflow 0 is too low but it's working fine for now... ... ... heh
set -sg escape-time 0
# from: https://github.com/tmux-plugins/tpm
# List of plugins
# Reload your session to get new plugins and update config: $ tmux source ~/.tmux.conf
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# turn continuum on
set -g @continuum-restore 'on'
# tmux-resurrect settings (defaults: vi vim nvim emacs man less more tail top htop irssi weechat mutt)
# guide: https://github.com/tmux-plugins/tmux-resurrect/blob/master/docs/restoring_programs.md
# set -g @resurrect-processes 'ssh psql mysql sqlite3'
set -g @resurrect-processes 'sqlite3'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'git@github.com/user/plugin'
# set -g @plugin 'git@bitbucket.com/user/plugin'
# set -g @plugin 'tmux-plugins/tmux-sensible'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'