made visual mode in tmux work as in neovim

This commit is contained in:
pika 2025-03-27 09:55:53 +01:00
parent c595038226
commit 01898f5cbf

View file

@ -8,10 +8,23 @@ set-option -sa terminal-overrides ",xterm-256color*:Tc"
# ─< Enable mouse support (for scrolling, resizing, etc.) >───────────────────────────────
set -g mouse on
# Set the prefix key to C-Space instead of default C-b
unbind C-b
# ─< set the prefix to "C-Space" >────────────────────────────────────────────────────────
set -g prefix C-Space
bind C-Space send-prefix
bind h copy-mode
bind -T copy-mode-vi v send -X begin-selection
# Reload tmux configuration without restarting tmux
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
# ─< Use C-h and C-l to switch between panes >────────────────────────────────────────────
bind -n C-h select-pane -L
bind -n C-l select-pane -R
bind -n C-f resize-pane -Z
# Ensure that when prefix is pressed, the mode indicator is shown
set -g mode-keys vi # Use vi keybindings in copy mode
@ -119,17 +132,6 @@ set -g @tmux-gruvbox-right-status-y '󰃭 %d.%m.%Y' # Date format (e.g., 30.01.
# Key Bindings
# ───────────────────────────────────────────────────────────────────────────
# Set the prefix key to C-Space instead of default C-b
unbind C-b
# ─< Use C-h and C-l to switch between panes >────────────────────────────────────────────
bind -n C-h select-pane -L
bind -n C-l select-pane -R
bind -n C-f resize-pane -Z
# Reload tmux configuration without restarting tmux
bind r source-file ~/.tmux.conf \; display-message "Config reloaded!"
# # ────────────────────────────────────< status configs >────────────────────────────────────
# ───────────────────────────────────────< plugins >─────────────────────────────────────