|
1 |
| -### Change bind prefix |
2 | 1 | unbind C-b
|
3 |
| -set -g prefix C-s |
| 2 | +set -g prefix C-k |
| 3 | +bind-key C-k send-prefix |
4 | 4 |
|
5 |
| -### set right colors |
6 | 5 | set -ga terminal-overrides ",screen-256color:Tc"
|
7 | 6 |
|
8 |
| -## Resize panel |
9 |
| -### Fine adjustment (1 or 2 cursor cells per bump) |
| 7 | +unbind % |
| 8 | +bind | split-window -h |
| 9 | +unbind '"' |
| 10 | +bind - split-window -v |
| 11 | + |
| 12 | +bind-key m resize-pane -Z |
| 13 | + |
| 14 | + |
| 15 | +# Coarse adjustment (5 or 10 cursor cells per bump) |
| 16 | +bind -n C-Left resize-pane -L 10 |
| 17 | +bind -n C-Right resize-pane -R 10 |
| 18 | +bind -n C-Down resize-pane -D 5 |
| 19 | +bind -n C-Up resize-pane -U 5 |
| 20 | + |
| 21 | +bind c new-window -c "#{pane_current_path}" |
| 22 | +set -g base-index 1 |
| 23 | +set -g renumber-windows on |
| 24 | + |
| 25 | +# Fine adjustment (1 or 2 cursor cells per bump) |
10 | 26 | bind -n S-Left resize-pane -L 2
|
11 | 27 | bind -n S-Right resize-pane -R 2
|
12 | 28 | bind -n S-Down resize-pane -D 1
|
13 | 29 | bind -n S-Up resize-pane -U 1
|
14 |
| -bind-key f resize-pane -Z |
15 | 30 |
|
16 | 31 | # Coarse adjustment (5 or 10 cursor cells per bump)
|
17 | 32 | bind -n C-Left resize-pane -L 10
|
18 | 33 | bind -n C-Right resize-pane -R 10
|
19 | 34 | bind -n C-Down resize-pane -D 5
|
20 | 35 | bind -n C-Up resize-pane -U 5
|
21 | 36 |
|
22 |
| -### New windows |
23 |
| -bind c new-window -c "#{pane_current_path}" |
24 |
| -set -g base-index 1 |
25 |
| -set -g renumber-windows on |
| 37 | + |
| 38 | +# vim-like pane switching |
| 39 | +bind -r k select-pane -U |
| 40 | +bind -r j select-pane -D |
| 41 | +bind -r h select-pane -L |
| 42 | +bind -r l select-pane -R |
| 43 | + |
| 44 | + |
| 45 | +set -g mouse |
| 46 | + |
| 47 | +bind r source-file ~/.tmux.conf \; display "Reloaded!" |
| 48 | + |
| 49 | +# set-window-option -g mode-keys vi |
| 50 | + |
| 51 | +bind-key -T copy-mode-vi 'v' send -X begin-selection # start selecting text with "v" |
| 52 | +bind-key -T copy-mode-vi 'y' send -X copy-selection # copy text with "y" |
| 53 | + |
| 54 | +unbind -T copy-mode-vi MouseDragEnd1Pane # don't exit copy mode when dragging with mouse |
| 55 | + |
| 56 | +# remove delay for exiting insert mode with ESC in Neovim |
| 57 | +set -sg escape-time 10 |
| 58 | +# Resizing pane |
| 59 | +bind -r C-k resize-pane -U 5 |
| 60 | +bind -r C-j resize-pane -D 5 |
| 61 | +bind -r C-h resize-pane -L 5 |
| 62 | +bind -r C-l resize-pane -R 5 |
| 63 | + |
| 64 | + |
| 65 | +# list of tmux plugins |
| 66 | +#set -g @plugin 'christoomey/vim-tmux-navigator' |
| 67 | +set -g @plugin 'tmux-plugins/tmux-resurrect' # persist tmux sessions after computer restart |
| 68 | +set -g @plugin 'tmux-plugins/tmux-continuum' # automatically saves sessions for you every 15 minutes |
| 69 | +set -g @plugin 'fabioluciano/tmux-tokyo-night' |
| 70 | + |
| 71 | + |
| 72 | +set -g @resurrect-capture-pane-contents 'on' |
| 73 | +set -g @continuum-restore 'on' |
| 74 | + |
| 75 | + |
| 76 | +# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) |
| 77 | +run '~/.tmux/plugins/tpm/tpm' |
| 78 | + |
0 commit comments