tmux:textobjs: Implement more objects (`,[,(,<,{)

This commit is contained in:
2024-09-02 11:08:14 +02:00
parent e54b1fc71a
commit 7e25fed27c

View File

@@ -113,7 +113,7 @@ case "$motion" in
tmux send -X end-of-line
;;
# TODO: These two fail when the cursor sits on the quote
# TODO: All following break when the cursor sits on the start or end
\")
tmux send -X jump-to-backward '"'
tmux send -X other-end
@@ -124,4 +124,30 @@ case "$motion" in
tmux send -X other-end
tmux send -X jump-to-forward "'"
;;
\`)
tmux send -X jump-to-backward '`'
tmux send -X other-end
tmux send -X jump-to-forward '`'
;;
'[|]')
tmux send -X jump-to-backward '['
tmux send -X other-end
tmux send -X jump-to-forward ']'
;;
'b|(|)')
tmux send -X jump-to-backward '('
tmux send -X other-end
tmux send -X jump-to-forward ')'
;;
'<|>')
tmux send -X jump-to-backward '<'
tmux send -X other-end
tmux send -X jump-to-forward '>'
;;
'B|{|}')
# TODO: make this work over multiple lines
tmux send -X jump-to-backward '{'
tmux send -X other-end
tmux send -X jump-to-forward '}'
;;
esac