# libtmux.Pane.move

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/pane.py#L2280
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-pane-move/

tmux command: [`move-pane`](/en/tmux/latest/manual/move-pane/)

```
libtmux.Pane.move(
    self,
    target: str | Pane | Window,
    vertical: bool = True,
    detach: bool = True,
    full_window: bool | None = None,
    size: str | int | None = None,
    before: bool | None = None,
) -> None
```

Move this pane to another window via [`$ tmux move-pane`](/en/tmux/latest/manual/move-pane/).

Similar to :meth:`join` but invokes the [`move-pane`](/en/tmux/latest/manual/move-pane/) command directly.

## Examples

```python
>>> pane_to_move = window.split(shell='sleep 1m')
>>> w2 = session.new_window(window_name='move_target')
>>> pane_to_move.move(w2)
```

## Parameters

- `target` (`str | Pane | Window`): Target pane or window to move into.
- `vertical` (`bool`): Split vertically (``-v`` flag), default True. False for
horizontal (``-h``).
- `detach` (`bool`): Do not switch to the target window (``-d`` flag), default True.
- `full_window` (`bool | None`): Use the full window width/height (``-f`` flag).
- `size` (`str | int | None`): Size for the moved pane (``-l`` flag).
- `before` (`bool | None`): Place the pane before the target (``-b`` flag).

## In other ports

### Move a pane to another position

- Ruby: [`LibTmux::Pane#move`](/en/ruby/latest/reference/libtmux-pane-move/) (method)
- Lua: [`libtmux.Pane:move_to`](/en/lua/latest/reference/libtmux-pane-move_to/) (method)
- Go: [`tmux.Pane.Move`](/en/go/latest/reference/tmux-pane-move/) (method)
- C#: [`LibTmux.Pane.MoveAsync`](/en/csharp/latest/reference/libtmux-pane-moveasync/) (method)
