-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
92 lines (67 loc) · 2.84 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
# unbind-key -a
# set shell
set -g default-shell /bin/bash
# change the default escape signal to C-s, to avoid strain on fingers
set-option -g prefix C-s
# millisecond a pane number is displayed (q)
set -g display-panes-time 4000
# start window indexing at one instead of zero
set -g base-index 1
# make C-s C-s flip between two windows
bind-key C-s last-window
# # easier pannel splitting
bind | split-window -h -c '#{pane_current_path}'
bind - split-window -v -c '#{pane_current_path}'
# new windows with current working directory
unbind-key c
bind-key c new-window -c "#{pane_current_path}"
# Reload key
bind-key R source-file ~/.tmux.conf \; display-message "Config reloaded..."
# set-window-option -g xterm-keys on # to make ctrl-arrow, etc. work
# integrate with vim airline in colors managements
set -g default-terminal "screen-256color"
# make tmux more similar to vim
# https://sanctum.geek.nz/arabesque/vi-mode-in-tmux/
# press Ctrl - b [ (or whatever is the escape for tmux) to get in copy mode and
# then more around similar to vi
set-window-option -g mode-keys vi
# move panes using h, j, k, l instead of the arrow
bind -r h select-pane -L
bind -r j select-pane -D
bind -r k select-pane -U
bind -r l select-pane -R
# also see:
# http://jasonwryan.com/blog/2011/06/07/copy-and-paste-in-tmux/
# move around like vim while in copy-mode
# setw -g mode-keys vi
# # # change the way to swap to copy-mode from C-t [ to Esc
# unbind [
# bind Escape copy-mode
# # make copy and paste similar to vim. y, p and visual mode v
# unbind p
# bind p paste-buffer
# bind-key -t vi-copy 'v' begin-selection
# bind-key -t vi-copy 'y' copy-selection
#
# THEME
# status bar
set -g status-bg blue
set -g status-fg white
set -g status-keys vi
set-option -g status-right-length 50
set -g status-right "#($HOME/bin/tmuxStatus queue), %a %d/%m/%y %R"
# # smart pane switching with awareness of vim splits
# # requires vim-tmux-navigator
# the problem is that it binds Ctrl-k to moving pane rather than killing till
# end of the line.
# # https://github.com/christoomey/vim-tmux-navigator
# bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
# bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
# bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
# bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
# bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
#
# THEME
# set -g status-interval 10
# not working properly...
# set -g status-right "#[fg=red]#(whoami)@#(hostname):#[fg=blue]$PWD #[default]"