madelyn

Forum Replies Created

Viewing 1 replies (of 1 total)
  • Replies
  • madelyn
    Participant
    none

    tmux doesn’t support true rectangular (blockwise) selection in copy mode the same way Vim does. When you enter copy mode with vi keys (usually Ctrl+b [), tmux treats text as a continuous stream, so if you have multiple panes visible, it will scroll across all visible text regions.

    To copy text from just one Vim pane (or any single tmux pane), you have a few options:

    1. Focus the specific pane first
      Make sure you’re in the pane you want to copy from before entering copy mode:

      Ctrl+b q

      (Shows pane numbers, select the one you want with its number key.)
      Then enter copy mode:

      Ctrl+b [

      Now tmux will only select text within that focused pane.

    2. Use Vim’s own visual block mode
      Since you’re using Vim inside tmux, it’s often easier to rely on Vim’s native selection. In Vim:

      Ctrl+v (start blockwise visual mode)

      Move the cursor to select, then:

      y (yank)

      This is usually smoother for multi-line partial selections.

    3. If you really need rectangular selection in tmux itself
      You can emulate it by enabling mouse mode and selecting text directly with the mouse:

      set -g mouse on

      Then hold Shift and drag with the mouse to select only within one pane (depends on your terminal).

    Unfortunately, tmux’s copy mode itself doesn’t have native blockwise selection support like Vim’s Ctrl+v visual block mode. For precise rectangular copying, Vim’s visual block or an external tool like reptyr or xclip with mouse support is the more reliable choice.

    0
    0
Viewing 1 replies (of 1 total)