1c0c844dca95e1c9b3b72e1260a5ee79623f3b0e
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 3 years ago

5) # Make ^a a send ^a (Useful in minicom)
dblume Restore ability to toggle b...

dblume authored 2 years ago

6) bind 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
dblume tmux rectangle-toggle shoul...

dblume authored 2 years ago

15) bind -T copy-mode-vi C-v send -X rectangle-toggle
dblume Restore ability to toggle b...

dblume authored 2 years ago

16) bind -T copy-mode-vi y send -X copy-selection-and-cancel
dblume Remap v and y for tmux copy...

dblume authored 2 years ago

17) 
David Blume Added vim mappings to tmux.

David Blume authored 4 years ago

18) # Vim style pane splitting
dblume Restore ability to toggle b...

dblume authored 2 years ago

19) bind v split-window -h
20) bind s split-window -v
David Blume Added vim mappings to tmux.

David Blume authored 4 years ago

21) 
22) # Vim style pane selection
23) bind h select-pane -L
David Blume Delete some trailing whites...

David Blume authored 4 years ago

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

David Blume authored 4 years ago

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

dblume authored 2 years ago

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

David Blume authored 4 years ago

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

David Blume authored 4 years ago

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

David Blume authored 4 years ago

37) bind -n M-k select-pane -U
38) bind -n M-l select-pane -R
39) 
40) # Use Alt-arrow keys without prefix key to switch panes
41) bind -n M-Left select-pane -L
42) bind -n M-Right select-pane -R
43) bind -n M-Up select-pane -U
44) bind -n M-Down select-pane -D
45) 
dblume tmux Tab to toggle full scr...

dblume authored 1 year ago

46) # Use Tab to rotate full-screen panes like I do vim buffers
47) bind -r Tab select-pane -t .+1 \; resize-pane -Z
48) 
David Blume Added vim mappings to tmux.

David Blume authored 4 years ago

49) # Theme
David Blume Add support for tmux; use p...

David Blume authored 4 years ago

50) set -g status-keys vi
51) set -g status-fg white
52) set -g status-bg colour235
David Blume tmux status line pane refin...

David Blume authored 3 years ago

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

dblume authored 3 years ago

54) 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

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

David Blume authored 4 years ago

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

David Blume authored 4 years ago

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

David Blume authored 3 years ago

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

dblume authored 3 years ago

60) #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

61) #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

62) 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

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