-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf
executable file
·78 lines (65 loc) · 2.11 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
# fish, powerline
set-option -g default-shell /usr/bin/fish
# According to https://github.com/fish-shell/fish-shell/issues/5699,
# no need to set both default-shell and default-command to fish,
# otherwise #{pane_current_path} does not work!!!
# set-option -g default-command /bin/bash
set -g default-terminal "screen-256color"
set-option -g terminal-overrides 'xterm*:colors=256'
# Prefix
set-option -g prefix C-z
set-option -g mouse on
set -g @scroll-speed-num-lines-per-scroll 50
# Look & Feel
# set-window-option -g utf8 on
set-option -g status-interval 1
set-option -g status-justify "left"
set-option -g status-position top
# set-option -g status-left-length 70
# set-option -g status-right-length 90
# KeyBindings
# This is Emacs like Keybinddings
# Usage:
# Ctrl+z | create a new pane on the below side
# Ctrl+z - create a new pane on the left side
# Ctrl+z k kill the window is displayed currently
bind C-n previous-window
bind C-p next-window
# pane
unbind 1
bind 1 select-window -t 1
# divide vertical
bind - split-window -c '#{pane_current_path}' -v
# divide horizontal
bind | split-window -c '#{pane_current_path}' -h
# new window
bind C-c new-window -c '#{pane_current_path}'
# bind C-r source-file ~/.tmux.conf
# erase
bind C-k kill-pane
bind k kill-window
unbind &
# move panes
# https://qiita.com/SS1031/items/1a6a641ce15c89da2761
unbind C-o
unbind o
bind o select-pane -t :.+
bind C-o select-pane -t :.+
# bind-key C-y paste-buffer
# how to copy and paste
# C-z [ ==> cursor mode
# C-z @ ==> selection mode
# C-{p, n, b, f} ==> move the cursor
# Alt-w ==> copy the region
# C-z C-y => paste
# C-z o => move panes
set -g @sidebar-tree-command 'tree -C -L 3 -a -I ".git|__pycache__|node_modules|.ipynb_checkpoints"'
run-shell "~/.config/tmux/plugin/tmux-sidebar/sidebar.tmux"
run-shell "~/.config/tmux/plugin/tmux-resurrect/resurrect.tmux"
run-shell "~/.config/tmux/plugin/tmux-continuum/continuum.tmux"
run-shell "~/.config/tmux/plugin/tmux-named-snapshot/named-snapshot.tmux"
set -g @named-snapshot-save 'M:*'
set -g @named-snapshot-restore 'N:*'
bind C-n previous-window
bind C-p next-window
run-shell "~/.config/tmux/golden.tmux"