diff options
| author | Mitsuo Tokumori <[email protected]> | 2025-06-04 01:03:45 +0900 |
|---|---|---|
| committer | Mitsuo Tokumori <[email protected]> | 2025-06-04 01:03:45 +0900 |
| commit | 55fa988f6f8316918f8a1a5a901b0561467c1b77 (patch) | |
| tree | a2a0346acaf41a3911a7445116003c213152eef6 /minimal/.config/tmux/tmux.conf | |
| parent | 0876b5a6254d78910d5530439fd8d2735d257c9a (diff) | |
| download | dotfiles-55fa988f6f8316918f8a1a5a901b0561467c1b77.tar.gz dotfiles-55fa988f6f8316918f8a1a5a901b0561467c1b77.tar.bz2 dotfiles-55fa988f6f8316918f8a1a5a901b0561467c1b77.zip | |
Create extra/ and minimal/
minimal/ should be a minimal subset of public/ to be used when
installing configuration files on a VPS or VM.
Move .git-prompt.sh to extra to be sym-linked both in public/ and
minimal/
Diffstat (limited to 'minimal/.config/tmux/tmux.conf')
| -rw-r--r-- | minimal/.config/tmux/tmux.conf | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/minimal/.config/tmux/tmux.conf b/minimal/.config/tmux/tmux.conf new file mode 100644 index 0000000..be38e4c --- /dev/null +++ b/minimal/.config/tmux/tmux.conf @@ -0,0 +1,62 @@ +# Minimal tmux config +# Ref.: https://thevaluable.dev/tmux-config-mouseless/ + +# remap prefix from 'C-b' to 'C-a' +set-option -g prefix C-a +bind-key C-a send-prefix +unbind C-b + +# Start window numbering at 1 +set -g base-index 1 +setw -g pane-base-index 1 + +# Navigate history with vi keybindings +set-window-option -g mode-keys vi +set -g history-limit 10000 + +# From NeoVim advice: +# Fix 'escape-time' from 500ms to 10ms (better experience in Vim) +set-option -sg escape-time 10 +# focus-events (idk what this does) +set-option -g focus-events on + +# Vim friendly tmux config +# Ref.: https://gist.github.com/Lartza/6a7a62466a8a3e436234412d9b1c5066 + +setw -g monitor-activity on +set -g visual-activity on + +# FIXME: https://unix.stackexchange.com/a/131187/347754 +# y and p as in vim +bind Escape copy-mode +unbind p +bind p paste-buffer +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-selection +#bind-key -T copy-mode-vi 'Space' send -X halfpage-down +#bind-key -T copy-mode-vi 'Bspace' send -X halfpage-up + +# extra commands for interacting with the ICCCM clipboard +#bind C-c run "tmux save-buffer - | xclip -i -sel clipboard" +#bind C-v run "tmux set-buffer \"$(xclip -o -sel clipboard)\"; tmux paste-buffer" + +# New panes in the same window maintain the current path +# Thanks: https://unix.stackexchange.com/a/109255/347754 +bind % split-window -h -c "#{pane_current_path}" +bind '"' split-window -v -c "#{pane_current_path}" + +# moving between panes with vim movement keys +bind h select-pane -L +bind j select-pane -D +bind k select-pane -U +bind l select-pane -R + +# moving between windows with vim movement keys +bind -r C-h select-window -t :- +bind -r C-l select-window -t :+ + +# resize panes with vim movement keys +bind -r H resize-pane -L 5 +bind -r J resize-pane -D 5 +bind -r K resize-pane -U 5 +bind -r L resize-pane -R 5 |
