nvim+tmux smart-splits
This commit is contained in:
+32
-32
@@ -79,12 +79,6 @@ bind i display-panes
|
||||
# Config Reloads
|
||||
bind r source-file ~/.config/tmux/tmux.conf \; refresh-client \; display-message "Config reloaded"
|
||||
|
||||
# resize controls
|
||||
bind -r h resize-pane -L 10 \; display-message "Resize left"
|
||||
bind -r l resize-pane -R 10 \; display-message "Resize right"
|
||||
bind -r k resize-pane -U 10 \; display-message "Resize up"
|
||||
bind -r j resize-pane -D 10 \; display-message "Resize down"
|
||||
|
||||
# zoom control
|
||||
bind -n M-o resize-pane -Z
|
||||
|
||||
@@ -141,27 +135,6 @@ bind q confirm-before -p "kill-pane #P? (y/n)" kill-pane
|
||||
# clear selected pane
|
||||
bind b send-keys -R \; clear-history \; send-keys Enter
|
||||
|
||||
# Smart pane switching with awareness of Vim splits.
|
||||
# See: https://github.com/christoomey/vim-tmux-navigator
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
|
||||
bind -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
|
||||
bind -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
|
||||
bind -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
|
||||
bind -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
|
||||
bind M-h "select-pane -L"
|
||||
bind M-j "select-pane -D"
|
||||
bind M-k "select-pane -U"
|
||||
bind M-l "select-pane -R"
|
||||
#bind -n M-\ if-shell "$is_vim" "send-keys M-\\" "select-pane -l"
|
||||
bind -T copy-mode-vi M-h select-pane -L
|
||||
bind -T copy-mode-vi M-j select-pane -D
|
||||
bind -T copy-mode-vi M-k select-pane -U
|
||||
bind -T copy-mode-vi M-l select-pane -R
|
||||
#bind -T copy-mode-vi M-\ select-pane -l
|
||||
|
||||
# fzf binding
|
||||
set -g @tmux-fzf-launch-key 'f'
|
||||
|
||||
######################
|
||||
### PLUGINS ###
|
||||
######################
|
||||
@@ -170,10 +143,34 @@ set -g @tmux-fzf-launch-key 'f'
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-yank'
|
||||
# set -g @plugin 'arcticicestudio/nord-tmux'
|
||||
# set -g @plugin 'seebi/tmux-colors-solarized'
|
||||
# set -g @plugin 'jimeh/tmux-themepack'
|
||||
# set -g @plugin 'wfxr/tmux-power'
|
||||
|
||||
|
||||
######################
|
||||
### PANE CONTROL ###
|
||||
######################
|
||||
|
||||
set -g @plugin 'mrjones2014/smart-splits.nvim'
|
||||
|
||||
# Optional configurations with their default values if omitted:
|
||||
|
||||
set -g @smart-splits_no_wrap '' # to disable wrapping. (any value disables wrapping)
|
||||
|
||||
set -g @smart-splits_move_left_key 'M-h' # key-mapping for navigation.
|
||||
set -g @smart-splits_move_down_key 'M-j' # --"--
|
||||
set -g @smart-splits_move_up_key 'M-k' # --"--
|
||||
set -g @smart-splits_move_right_key 'M-l' # --"--
|
||||
|
||||
set -g @smart-splits_resize_left_key 'C-h' # key-mapping for resizing.
|
||||
set -g @smart-splits_resize_down_key 'C-j' # --"--
|
||||
set -g @smart-splits_resize_up_key 'C-k' # --"--
|
||||
set -g @smart-splits_resize_right_key 'C-l' # --"--
|
||||
|
||||
set -g @smart-splits_resize_step_size '3' # change the step-size for resizing.
|
||||
|
||||
######################
|
||||
### THEME ###
|
||||
######################
|
||||
|
||||
set -g @plugin 'niksingh710/minimal-tmux-status'
|
||||
set -g @minimal-tmux-justify "centre"
|
||||
set -g @minimal-tmux-indicator-str " tmux "
|
||||
@@ -206,5 +203,8 @@ set -g @minimal-tmux-left-arrow ""
|
||||
set -g status-right-length 20
|
||||
set -g status-left-length 20
|
||||
|
||||
# keep at bottom
|
||||
######################
|
||||
### KEEP AT BOTTOM ###
|
||||
######################
|
||||
|
||||
run -b '~/.config/tmux/plugins/tpm/tpm'
|
||||
|
||||
Reference in New Issue
Block a user