CrispyConductor / tmux-copy-toolkit

TMUX plugin with various copy-mode tools
MIT License
59 stars 6 forks source link

Custom keybinds #3

Closed awerebea closed 3 years ago

awerebea commented 3 years ago

Hello! From README:

Keybinds

This table specifies the default keybinds. Additional keybinds can be added to tmux.conf. The defaults can be suppressed by adding this to tmux.conf:

set -g @copytk-no-default-binds on

Can you help me, how can I add my custom keybinds to tmux.conf after suppressing defaults?

awerebea commented 3 years ago

Found the solution myself:

# tmux-copy-toolkit
set -g @copytk-no-default-binds on
# copytk prefix: easymotion action bindings
bind-key -T copytk s run-shell -b "python3 ~/.tmux/plugins/tmux-copy-toolkit/copytk.py easymotion-search --search-nkeys 1"
bind-key -T copytk S run-shell -b "python3 ~/.tmux/plugins/tmux-copy-toolkit/copytk.py easymotion-search --search-nkeys 2"
bind-key -T copytk k run-shell -b "python3 ~/.tmux/plugins/tmux-copy-toolkit/copytk.py easymotion-lines --search-direction backward"
bind-key -T copytk j run-shell -b "python3 ~/.tmux/plugins/tmux-copy-toolkit/copytk.py easymotion-lines --search-direction forward"
bind-key -T copytk n run-shell -b "python3 ~/.tmux/plugins/tmux-copy-toolkit/copytk.py easymotion-lines"
.
.
.
# bindings to enter copytk prefix
bind-key -T copy-mode-vi a switch-client -T copytk  # uppercase keybind doesn't work in my case 
bind-key -T copy-mode a switch-client -T copytk     # uppercase keybind doesn't work in my case