af8f2ca20e2e241dde52f5a992139c0147be2051
David Blume Added vim mappings to tmux.

David Blume authored 4 years ago

1) # C-b already in use by vim for page up. Use screen's prefix.
David Blume Remap tmux prefix key. C-b...

David Blume authored 4 years ago

2) set -g prefix C-a
3) unbind C-b
4) bind C-a send-prefix
David Blume Add C-a a in tmux; tweaks f...

David Blume authored 4 years ago

5) # Make ^a a send ^a (Useful in minicom)
6) bind-key a send-prefix
David Blume Added vim mappings to tmux.

David Blume authored 4 years ago

7) 
8) # No delay for escape key press (vim mode changes)
9) set -sg escape-time 0
10) 
dblume Remap v and y for tmux copy...

dblume authored 2 years ago

11) # Copy mode more intuitive for vim users, use v and y
12) # From https://dev.to/iggredible/the-easy-way-to-copy-text-in-tmux-319g
13) # See https://ianthehenry.com/posts/how-to-configure-tmux/ for copy-pipe tips.
14) bind -T copy-mode-vi v send -X begin-selection
15) bind -T copy-mode-vi y send-keys -X copy-selection-and-cancel
16) 
David Blume Added vim mappings to tmux.

David Blume authored 4 years ago

17) # Vim style pane splitting
18) bind-key v split-window -h
19) bind-key s split-window -v
20) 
21) # Vim style pane selection
22) bind h select-pane -L
David Blume Delete some trailing whites...

David Blume authored 4 years ago

23) bind j select-pane -D
David Blume Added vim mappings to tmux.

David Blume authored 4 years ago

24) bind k select-pane -U
25) bind l select-pane -R
26) 
dblume Add pane resizing shortcuts...

dblume authored 2 years ago

27) # pane sizing with capital letters
28) bind -r H resize-pane -L
29) bind -r J resize-pane -D
30) bind -r K resize-pane -U
31) bind -r L resize-pane -R
32) 
David Blume Added vim mappings to tmux.

David Blume authored 4 years ago

33) # Use Alt-vim keys without prefix key to switch panes
34) bind -n M-h select-pane -L
David Blume Delete some trailing whites...

David Blume authored 4 years ago

35) bind -n M-j select-pane -D
David Blume Added vim mappings to tmux.

David Blume authored 4 years ago

36) bind -n M-k select-pane -U
37) bind -n M-l select-pane -R
38) 
39) # Use Alt-arrow keys without prefix key to switch panes
40) bind -n M-Left select-pane -L
41) bind -n M-Right select-pane -R
42) bind -n M-Up select-pane -U
43) bind -n M-Down select-pane -D
44) 
45) # Theme
David Blume Add support for tmux; use p...

David Blume authored 4 years ago

46) set -g status-keys vi
47) set -g status-fg white
48) set -g status-bg colour235
David Blume tmux status line pane refin...

David Blume authored 3 years ago

49) set -g status-left-length 10
dblume Tighten status line with tm...

dblume authored 3 years ago

50) set -g status-left "#[fg=green]#{?#{!=:#{window_panes},1},pane #P/#{window_panes},}#[default]"
David Blume Add support for tmux; use p...

David Blume authored 4 years ago

51) set -g status-justify centre
52) set -g status-right '#[fg=green]%m/%d %H:%M#[default]'
David Blume Added vim style scrolling.

David Blume authored 4 years ago

53) setw -g mode-keys vi
David Blume Premature optimization: tur...

David Blume authored 4 years ago

54) setw -g automatic-rename off
David Blume By default tmux sessions co...

David Blume authored 3 years ago

55) setw -g aggressive-resize
dblume Turn off allow-rename, dupl...

dblume authored 3 years ago

56) #set -g allow-rename on  ## ssh'ed servers may rename window to PS1, duplicating path
David Blume Want the pane's path to be...

David Blume authored 4 years ago

57) #setw -g window-status-current-format '#[fg=yellow]#I:#F:#T:.../#{b:pane_current_path}#[default]'
dblume Tighten status line with tm...

dblume authored 3 years ago

58) setw -g window-status-current-format '#{?#{!=:#{session_windows},1},#I:#W:,}#[fg=yellow]#{?window_zoomed_flag,Z:,}#{s\/home/dblume\~\:pane_current_path}#[default]'
dblume Better status for tmux wind...

dblume authored 3 years ago

59) setw -g window-status-format '#[fg=colour241]#I:#W#[default]'