mirror of
https://github.com/mentos1386/dotfiles.git
synced 2024-11-29 18:41:19 +00:00
38 lines
1.3 KiB
Bash
38 lines
1.3 KiB
Bash
bind c new-window -c "#{pane_current_path}"
|
|
|
|
set -g status-keys vi
|
|
setw -g mode-keys vi
|
|
|
|
bind | split-window -h -c "#{pane_current_path}"
|
|
bind - split-window -v -c "#{pane_current_path}"
|
|
|
|
# https://stackoverflow.com/questions/18600188/home-end-keys-do-not-work-in-tmux
|
|
bind -n Home if-shell "$is_vim" "send-keys Escape 'OH'" "send-key C-a"
|
|
bind -n End if-shell "$is_vim" "send-keys Escape 'OF'" "send-key C-e"
|
|
|
|
set -g default-terminal "tmux-256color"
|
|
# Update with value from default-terminal
|
|
set -ga terminal-overrides ",tmux-256color:Tc"
|
|
|
|
# Ms modifies OSC 52 clipboard handling to work with mosh, see
|
|
# https://gist.github.com/yudai/95b20e3da66df1b066531997f982b57b
|
|
set -ag terminal-overrides "vte*:XT:Ms=\\E]52;c;%p2%s\\7,xterm*:XT:Ms=\\E]52;c;%p2%s\\7"
|
|
|
|
# enable OSC 52 clipboard
|
|
set -g set-clipboard on
|
|
|
|
set -g mouse on
|
|
|
|
unbind-key -T copy-mode-vi v
|
|
unbind-key -T copy-mode-vi V
|
|
unbind-key -T copy-mode-vi y
|
|
unbind-key -T copy-mode-vi Enter
|
|
unbind-key p
|
|
# Begin selection in copy mode.
|
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
|
# Begin rectangle selection in copy mode.
|
|
bind-key -T copy-mode-vi 'V' send -X rectangle-toggle
|
|
# Yank selection in copy mode.
|
|
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
|
bind-key -T copy-mode-vi Enter send -X copy-selection
|
|
bind p paste-buffer
|