Clean tmux.conf
This commit is contained in:
parent
6caabfe345
commit
f12a9baf53
20
tmux.conf
20
tmux.conf
|
@ -1,6 +1,4 @@
|
||||||
## Behavior ###############
|
## Behavior ###############
|
||||||
# set correct Term
|
|
||||||
# set-option -g default-terminal "screen-256color"
|
|
||||||
# Zero-based indexing is fine in programming languages, but not so much in
|
# Zero-based indexing is fine in programming languages, but not so much in
|
||||||
# a multiplexer when zero is on the other side of the keyboard.
|
# a multiplexer when zero is on the other side of the keyboard.
|
||||||
set -g base-index 1
|
set -g base-index 1
|
||||||
|
@ -23,7 +21,7 @@ set-option -g default-command "reattach-to-user-namespace -l zsh"
|
||||||
|
|
||||||
## Key bindings ###########
|
## Key bindings ###########
|
||||||
# Remap the key prefix
|
# Remap the key prefix
|
||||||
set -g prefix C-a
|
set -g prefix C-Space
|
||||||
unbind C-b
|
unbind C-b
|
||||||
# Restore go-to-start-of-line shortcut
|
# Restore go-to-start-of-line shortcut
|
||||||
bind C-a send-prefix
|
bind C-a send-prefix
|
||||||
|
@ -47,30 +45,22 @@ bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
|
||||||
# Better splitting keybinds
|
# Better splitting keybinds
|
||||||
unbind %
|
unbind %
|
||||||
unbind '"'
|
unbind '"'
|
||||||
bind H split-window -v
|
bind s split-window -v
|
||||||
bind V split-window -h
|
bind v split-window -h
|
||||||
|
|
||||||
# Navigate between panes
|
# Navigate between panes
|
||||||
bind h select-pane -L
|
|
||||||
bind j select-pane -D
|
|
||||||
bind k select-pane -U
|
|
||||||
bind l select-pane -R
|
|
||||||
bind-key -r C-h select-window -t :-
|
|
||||||
bind-key -r C-l select-window -t :+
|
|
||||||
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
|
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-h) || tmux select-pane -L"
|
||||||
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
|
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-j) || tmux select-pane -D"
|
||||||
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
|
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-k) || tmux select-pane -U"
|
||||||
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
|
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys C-l) || tmux select-pane -R"
|
||||||
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
|
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iqE '(^|\/)g?(view|vim?)(diff)?$' && tmux send-keys 'C-\\') || tmux select-pane -l"
|
||||||
|
# bind-key -r C-h select-window -t :-
|
||||||
|
# bind-key -r C-l select-window -t :+
|
||||||
|
|
||||||
# after copying to a tmux buffer, hit y again to copy to clipboard
|
# after copying to a tmux buffer, hit y again to copy to clipboard
|
||||||
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
|
bind y run "tmux save-buffer - | reattach-to-user-namespace pbcopy"
|
||||||
# quick view of processes
|
# quick view of processes
|
||||||
bind '~' split-window "exec top"
|
bind '~' split-window "exec top"
|
||||||
# Cycling through windows
|
|
||||||
bind-key -n C-right next
|
|
||||||
bind-key -n C-left prev
|
|
||||||
|
|
||||||
|
|
||||||
## Looks ########################
|
## Looks ########################
|
||||||
# make tmux display things in 256 colors
|
# make tmux display things in 256 colors
|
||||||
|
|
Loading…
Reference in a new issue