-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
105 lines (85 loc) · 2.54 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#.
#/>=---------------------------------------------------------------------------
#
# ~/.tmux.conf :: jcopp.cfxd.net
#
#\>=---------------------------------------------------------------------------
#`
# window settings etc
set -g default-terminal "xterm-256color"
set -g history-limit 9999999
# enable focus events needed by vim-gitgutter
set -g focus-events on
# disable win renaming via terminal escape sequences
set -g allow-rename off
# colors
set -g status-bg black
set -g status-fg white
set -g status-left-length 20
set -g status-left '#[fg=green](#S) #(whoami) #[default]'
set -g window-status-current-style reverse
# impatient i am, yes
set -s escape-time 0
# key bindings
set -g prefix C-j
unbind C-b
setw -g mode-keys vi
# use ctrl+jj to go to prev window
unbind l
bind C-j last-window
# reload tmux
bind R source-file ~/.tmux.conf
# make nesting work
bind a send-prefix
# split window
unbind ^T
bind ^T split-window -p 50
# kill window
unbind k
bind k confirm-before "kill-window"
# open new window in current directory
bind c new-window -c "#{pane_current_path}"
# bindings for panes
bind | split-window -h -c "#{pane_current_path}"
bind _ split-window -v -c "#{pane_current_path}"
unbind ^x
bind ^x kill-pane
# cycle through panes
unbind ^A
bind -r ^A select-pane -t :.+
# easier pane resizing
bind -r L resize-pane -R 4
bind -r H resize-pane -L 4
bind -r K resize-pane -U 4
bind -r J resize-pane -D 4
# ftpane switch pane
bind 0 run "tmux split-window -l 12 'bash -ci ftpane'"
# save history to file
bind P run "tmux capture-pane -S -; tmux save-buffer ~/tmp/tmux.history.\"$(date +%s)\""
# os specific settings
if-shell '[ "$(uname)" = "Darwin" ]' 'source-file ~/.tmux-osx.conf'
if-shell '[ "$(uname)" = "Linux" ]' 'source-file ~/.tmux-linux.conf'
# manage plugins for tmux with tpm
# https://github.com/tmux-plugins/tpm
#
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open'
#
set -g @plugin 'b0o/tmux-autoreload'
#
set -g @plugin 'Morantron/tmux-fingers'
set -g @fingers-jump-key j
#
set -g @plugin 'jobicoppola/tmux-fzf-url#feature/jira-copy' # TODO submit pr to wfxr/tmux-fzf-url
set -g @fzf-url-extra-filter 'grep -oE "\b[a-zA-Z]+\.txt\b"'
set -g @fzf-url-fzf-options '-d 20% -m -0 --no-preview --no-border'
set -g @fzf-url-jira-key 'DNTFD'
set -g @fzf-url-copy true
#
set -g @plugin 'abhinav/tmux-fastcopy'
set -g @fastcopy-key f
set -g @fastcopy-action pbcopy
# initialize tpm - keep this line at bottom of .tmux.conf
run '~/.tmux/plugins/tpm/tpm'