# pane.Pane

- **Module:** pane
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/libtmux/src/pane.ts#L97
- **Page:** https://libtmux.org/en/ts/latest/reference/pane-pane/

One pane on one tmux server, as a handle rather than a copy of it.

Reached from [`Window.panes`](/en/ts/latest/reference/window-window-panes/), [`Session.activePane`](/en/ts/latest/reference/session-session-activepane/) or a split;
the constructor throws. The tmux format row the handle was built from reads
back through [`Pane.format`](/en/ts/latest/reference/pane-pane-format/), and by tmux's own field names directly on
the handle. Those values are a snapshot taken when the handle was made and
do not follow the pane — [`Pane.refreshed`](/en/ts/latest/reference/pane-pane-refreshed/) takes a new one.

Identity is the socket, the daemon that answered on it, and `%n` together,
because a restarted server issues `%0` again to a different pane.
[`Pane.equals`](/en/ts/latest/reference/pane-pane-equals/) asks that question; [`Pane.sameTmuxIdAs`](/en/ts/latest/reference/pane-pane-sametmuxidas/) asks the
weaker one.

## Members

### Parent objects

- [`window`](/en/ts/latest/reference/pane-pane-window/) (method): The window placement containing this pane.
- [`session`](/en/ts/latest/reference/pane-pane-session/) (method): The session containing this pane.
- [`server`](/en/ts/latest/reference/pane-pane-server/) (attribute): The server this pane belongs to.

### Common operations

- [`capture`](/en/ts/latest/reference/pane-pane-capture/) (method): Capture this pane's contents as lines.
- [`sendKeys`](/en/ts/latest/reference/pane-pane-sendkeys/) (method): Send keys to this pane, following them with Enter unless told not to.
- [`split`](/en/ts/latest/reference/pane-pane-split/) (method): Split this pane and resolve the created pane.
- [`respawn`](/en/ts/latest/reference/pane-pane-respawn/) (method): Restart this pane's command in place.
- [`kill`](/en/ts/latest/reference/pane-pane-kill/) (method): Destroy this pane.
- [`select`](/en/ts/latest/reference/pane-pane-select/) (method): Make this pane active in its window.
- [`breakOut`](/en/ts/latest/reference/pane-pane-breakout/) (method): Move this pane out into a window of its own, in the session it is in.
- [`clearHistory`](/en/ts/latest/reference/pane-pane-clearhistory/) (method): Discard this pane's scrollback history.
- [`setTitle`](/en/ts/latest/reference/pane-pane-settitle/) (method): Set this pane's title.
- [`pasteBuffer`](/en/ts/latest/reference/pane-pane-pastebuffer/) (method): Paste a named buffer into this pane, as if it were typed.
- [`resize`](/en/ts/latest/reference/pane-pane-resize/) (method): Resize this pane; tmux ignores a dimension its layout cannot honour.
- [`showOptions`](/en/ts/latest/reference/pane-pane-showoptions/) (method): Every option set on this pane itself, not the ones it inherits.
- [`swapWith`](/en/ts/latest/reference/pane-pane-swapwith/) (method): Exchange positions with another pane.
- [`pipeTo`](/en/ts/latest/reference/pane-pane-pipeto/) (method): Send everything this pane writes to a shell command as well as its screen.
- [`enterCopyMode`](/en/ts/latest/reference/pane-pane-entercopymode/) (method): Enter this pane's copy mode.
- [`showHooks`](/en/ts/latest/reference/pane-pane-showhooks/) (method): Read hooks set on this pane itself.
- [`joinTo`](/en/ts/latest/reference/pane-pane-jointo/) (method): Move this pane into another window as a split.
- [`setOption`](/en/ts/latest/reference/pane-pane-setoption/) (method): Set an option on this pane.
- [`unsetOption`](/en/ts/latest/reference/pane-pane-unsetoption/) (method): Remove an option from this pane.
- [`refreshed`](/en/ts/latest/reference/pane-pane-refreshed/) (method): This pane, read again at a new instant.
- [`setHook`](/en/ts/latest/reference/pane-pane-sethook/) (method): Bind a tmux command to a pane-scoped hook.
- [`unsetHook`](/en/ts/latest/reference/pane-pane-unsethook/) (method): Remove every command bound to a pane-scoped hook.
- [`displayMessage`](/en/ts/latest/reference/pane-pane-displaymessage/) (method): Expand a tmux format string against this pane.
- [`sendPrefix`](/en/ts/latest/reference/pane-pane-sendprefix/) (method): Send the configured prefix key to this pane.
- [`cmd`](/en/ts/latest/reference/pane-pane-cmd/) (method): Run a tmux command this package does not model, addressed at this pane.
- [`customizeMode`](/en/ts/latest/reference/pane-pane-customizemode/) (method): Open tmux's interactive option editor in this pane.
- [`chooseTree`](/en/ts/latest/reference/pane-pane-choosetree/) (method): Open the interactive session and window chooser in this pane.
- [`chooseBuffer`](/en/ts/latest/reference/pane-pane-choosebuffer/) (method): Open the interactive buffer chooser in this pane.
- [`findWindow`](/en/ts/latest/reference/pane-pane-findwindow/) (method): Search windows interactively from this pane.
- [`displayPopup`](/en/ts/latest/reference/pane-pane-displaypopup/) (method): Open a popup over the client showing this pane.
- [`showResolvedOptions`](/en/ts/latest/reference/pane-pane-showresolvedoptions/) (method): The option values that govern this pane, own and inherited together.
- [`displayMenu`](/en/ts/latest/reference/pane-pane-displaymenu/) (method): Show a menu over the client showing this pane.
- [`equals`](/en/ts/latest/reference/pane-pane-equals/) (method): Whether `other` is this same pane on this same server.
- [`exitCopyMode`](/en/ts/latest/reference/pane-pane-exitcopymode/) (method): Leave this pane's copy mode.
- [`killIfWindowUnshared`](/en/ts/latest/reference/pane-pane-killifwindowunshared/) (method): Destroy this pane only if its window has one placement.
- [`plan`](/en/ts/latest/reference/pane-pane-plan/) (method): The same mutations, described instead of run.
- [`sameTmuxIdAs`](/en/ts/latest/reference/pane-pane-sametmuxidas/) (method): Whether `other` carries the same `%n`, wherever it came from.
- [`unzoom`](/en/ts/latest/reference/pane-pane-unzoom/) (method): Restore this pane's window to its layout, whatever it was doing before.
- [`zoom`](/en/ts/latest/reference/pane-pane-zoom/) (method): Make this pane fill its window, whatever it was doing before.

### Other members

- [`constructor`](/en/ts/latest/reference/pane-pane-constructor/) (method)
- [`format`](/en/ts/latest/reference/pane-pane-format/) (property): The raw tmux format row, addressed by tmux's own token names.
- [`paneBrand`](/en/ts/latest/reference/pane-pane-panebrand/) (attribute)
- [`toString`](/en/ts/latest/reference/pane-pane-tostring/) (method): How this handle renders in a log line, a template literal, or an error.

## Guides

Pages that discuss `Pane`.

### Concepts

- [Server, session, window, pane](/en/ts/latest/concepts/server-session-window-pane/)

### Topics

- [Architecture](/en/ts/latest/topics/architecture/)

## In other ports

A tmux pane

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane`](/en/py/latest/reference/libtmux-pane/) (class) |
| Ruby | [`LibTmux::Pane`](/en/ruby/latest/reference/libtmux-pane-14z6/) (class) |
| Lua | [`libtmux.Pane`](/en/lua/latest/reference/libtmux-pane/) (class) |
| PowerShell | [`LibTmux\Get-TmuxPane`](/en/powershell/latest/reference/libtmux-get-tmuxpane/) (cmdlet). This cmdlet reads shared .NET `LibTmux.Pane` objects. Its [`-Server`](/en/powershell/latest/reference/libtmux-get-tmuxpane/#LibTmux%5CGet-TmuxPane.parameter.Server), [`-Session`](/en/powershell/latest/reference/libtmux-get-tmuxpane/#LibTmux%5CGet-TmuxPane.parameter.Session), and [`-Window`](/en/powershell/latest/reference/libtmux-get-tmuxpane/#LibTmux%5CGet-TmuxPane.parameter.Window) parameter sets select the scope. |
| Julia | [`LibTmux.PaneSnapshot`](/en/julia/latest/reference/libtmux-panesnapshot/) (struct). `PaneSnapshot` holds captured pane data. Actions use its `PaneRef`; `PaneOccurrence` adds a window placement in a session. |
| Elixir | [`LibTmux.Pane`](/en/elixir/latest/reference/libtmux-pane/) (struct). `Pane` is an immutable physical pane observation. It does not send keys or capture text. |
| Rust | [`pane.Pane`](/en/rs/latest/reference/pane-pane/) (struct) |
| Go | [`tmux.Pane`](/en/go/latest/reference/tmux-pane/) (struct) |
| Java | [`io.github.libtmux.Pane`](/en/java/latest/reference/io-github-libtmux-pane-pane/) (class) |
| Kotlin | [`io.github.libtmux.kotlin.Pane`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-pane/) (class) |
| Scala | [`io.github.libtmux.scaladsl.Pane`](/en/scala/latest/reference/io-github-libtmux-scaladsl-pane/) (typealias) |
| C# | [`LibTmux.Pane`](/en/csharp/latest/reference/libtmux-pane/) (class) |
| F# | [`LibTmux.FSharp.Pane`](/en/fsharp/latest/reference/libtmux-fsharp-pane/) (module). This F# module reads captured fields and starts explicit operations on the shared .NET `LibTmux.Pane` type. |
| C++ | [`libtmux::Pane`](/en/cxx/latest/reference/libtmux-pane/) (class) |
| Swift | [`Pane`](/en/swift/latest/reference/pane/) (struct) |
