Core LibraryunreleasedAPI Reference

Choose documentation 1

latest

Current version

latest
English

Unreleased libtmux_erlang has not been released. Its API may change during development. This site's structure and URLs may change too.

function libtmux-erlang latest

tmux_pane:swap/3

Exchange two panes' layout positions within or across physical windows. Preserves their IDs and processes; parent windows, dimensions, indexes and inherited options can change. Both rows require the same registered owner. detach defaults true; active positions can still receive different panes. zoom maps to native -Z. Identical IDs do not exchange panes, but native zoom handling still runs; the default can unzoom even a same-pane swap. Returns the command result; get/2 observes the resulting values explicitly.

Source and package
Qualified name
tmux_pane:swap/3
Declared in
tmux_pane
Package
libtmux_erlang
Source
apps/libtmux_erlang/src/tmux_pane.erl
Other languages
Perl PowerShell Julia Elixir Haskell Common Lisp PythonRubyLuaTypeScriptRustGoJavaC#C++ Swift Kotlin Scala OCaml F# Clojure
swap(Source, Destination, Options) -spec swap(tmux_model:pane(), tmux_model:pane(), swap_options()) -> {ok, tmux_operation:completed()} | {error, map()}.

tmux command#

The tmux commands behind swap/3.

tmux C API#

The C declarations in tmux that implement these commands.

Guides#

Pages that discuss swap/3.

In other ports#

Exchange two panes

Equivalents of Exchange two panes in other languages
Language Equivalent
Python libtmux.Pane.swap
Ruby LibTmux::Pane#swap
Lua libtmux.Pane:swap
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript pane.Pane.swapWith
Rust pane.Pane.swap_with
Go tmux.Pane.Swap
Java io.github.libtmux.Pane.swapWith
C# LibTmux.Pane.SwapAsync
C++ libtmux::Pane::swap_with
Swift Server.swap(_:with:) swaps windows, not panes
OCaml Libtmux_unix.Client.swap_panes
Perl No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands.

No equivalent is recorded in PowerShell, Julia, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference