aboutsummaryrefslogtreecommitdiff
path: root/.tmux.conf
diff options
context:
space:
mode:
Diffstat (limited to '.tmux.conf')
-rw-r--r--.tmux.conf53
1 files changed, 35 insertions, 18 deletions
diff --git a/.tmux.conf b/.tmux.conf
index 1813106..454d63c 100644
--- a/.tmux.conf
+++ b/.tmux.conf
@@ -1,25 +1,42 @@
-# modify the prefix
-# unbind ^b
-# set -g prefix 'M-`'
+# general
+
+unbind ^b
+set -g prefix 'C-\'
+bind 'C-\' send-prefix -2
+set -sg escape-time 0
+
+set -g default-terminal "xterm-256color"
+bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced'
+set -g mouse on
+set-option -g allow-rename off
# vim mode
-setw -g mode-keys vi
+set-window-option -g mode-keys vi
+
+# navigation
+
+bind n new-session
+bind f command-prompt -p find-session: 'switch-client -t %%'
+
+bind | split-window -h -c '#{pane_current_path}'
+bind - split-window -v -c '#{pane_current_path}'
+unbind '"'
+unbind %
+
+## swtich between pane
+bind h select-pane -L
+bind j select-pane -D
+bind k select-pane -U
+bind l select-pane -R
+
+## resize the pane
+bind H resize-pane -L 5
+bind L resize-pane -R 5
+bind K resize-pane -U 5
+bind J resize-pane -D 5
+
# copy and paste like vim
# bind -T copy-mode-vi 'v' send -X begin-selection
# bind -T copy-mode-vi 'y' send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
-# swtich between pane
-# bind h select-pane -L
-# bind j select-pane -D
-# bind k select-pane -U
-# bind l select-pane -R
-
-# resize the pane
-# bind h resize-pane -L 10
-# bind l resize-pane -R 10
-# bind k resize-pane -U 5
-# bind j resize-pane -D 5
-
-# color of tmux
-set -g default-terminal "screen-256color"