-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
49 lines (40 loc) · 1.21 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
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
# split panes using | and -
bind \\ split-window -h
bind - split-window -v
unbind '"'
unbind %
set -g default-command /opt/homebrew/bin/fish
set -g default-shell /opt/homebrew/bin/fish
#### tmux hotkeys
### windows
# prefix c - create new window
# prefix & - close current window
# prefix p - previous window
# prefix n - next window
# prefix 0..9 - switch to window number
# copy-mode
## / for searching down
## ? for searching up
## n for next item
## space for starting a selection
## and enter to copy the selection
#bind [ copy-mode
## default vi mode
setw -g mode-keys vi
## vi mode with copy to clipboard - use y instead of enter
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
# vim commands
## dd - delete line
## yy - copy line
## space - start selection mode v - visual mode vv - visual rectancgle mode y - copy, d - delete, p - paste
## commands
## prefix + ! # pane to new window
# https://unix.stackexchange.com/a/30283
bind-key x kill-pane
bind-key & kill-window