Repository navigation
How to prefix :setw synchronize-panes #211
|
How do I type on more than 1 terminal? |
Replies: 4 comments 5 replies
|
tuios doesn't have a
To use it:
Things to know:
|
|
This is cool... one enhancement that doesn't exist currently in any tmux plugins I could ever find is: I often will be in a workflow where I have multiple panes (Typically serial connections), and always wanted a "multi-focus copy mode" I get around this by looping over every pane in the window and copying the last N lines that contain the data I wanted on massaged to show up in the last line or so. This isn't bad, and works out.... but being able to do a multi-focus copy + search + yank would be incredible. I use helix editor so I've gotten into a multi-cursor mindset. #!/usr/bin/env bash
json=${1:-false}
lines=${2:-20}
output=$(
tmux list-panes -F '#{pane_index}:#{pane_id}:#{pane_title}' |
# tmux capture-pane -t "$pane" -p -S "-$lines" | sed '$d'
# tmux capture-pane -t "$pane" -p -S "-$((lines + 1))" -E "-2" | sed '$d'
# done
if $json; then
while IFS=: read -r index pane title; do
historyJson=$(tmux capture-pane -t "$pane" -p -S -56326 |
head -n -1 |
tail -n "$lines" |
jq -R -s 'split("\n") | .[:-1]')
jq -n \
--argjson pane "$index" \
--arg title "$title" \
--argjson history "$historyJson" \
'{
pane: $pane,
title: $title,
history: $history
}'
done |
jq -s .
else
while IFS=: read -r index pane title; do
printf '\n## Pane %s (%s)\n' "$index" "$title"
printf '```bash\n'
tmux capture-pane -t "$pane" -p -S -56326 |
head -n -1 |
tail -n "$lines"
printf '```\n'
done
fi
)
# printf '%s\n' "$output"
printf '%s\n' "$output" | ~/bin/tmux-copy-it |


tuios doesn't have a
:setw synchronize-panescommand. The equivalent feature is Multifocus, which broadcasts your typing to several windows the way tmux's synchronize-panes does (docs/LAYOUT_MODES.md#multifocus).Ctrl+Shift+Clickon a windowCtrl+P→ "Toggle multifocus"Ctrl+P→ "Clear multifocus"To use it:
Ctrl+Shift+Clickeach one, or focus each one and run "Toggle multifocus" from the palette). Windows in the set get a distinct border color.