# LibTmux.Server.splitPane

- **Package:** libtmux-haskell
- **Language:** Haskell
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-haskell/blob/72edb54317bf619c6dc54bff311844f062f8984c/src/LibTmux/Server.hs#L436
- **Page:** https://libtmux.org/en/haskell/latest/reference/libtmux-server-v-splitpane/

```haskell
splitPane
  :: Server
  -> WindowSlot
  -> PaneRef
  -> SplitOptions
  -> IO CreatedPane
```

Signature types: [`Server`](/en/haskell/latest/reference/libtmux-server-t-server/), [`WindowSlot`](/en/haskell/latest/reference/libtmux-creation-t-windowslot/), [`PaneRef`](/en/haskell/latest/reference/libtmux-snapshot-t-paneref/), [`SplitOptions`](/en/haskell/latest/reference/libtmux-creation-t-splitoptions/), [`IO`](https://hackage.haskell.org/package/base-4.22.0.0/docs/Prelude.html#t:IO), [`CreatedPane`](/en/haskell/latest/reference/libtmux-creation-t-createdpane/).

Split one explicit pane in an exact session/index link. The slot must
 contain that pane's physical window when tmux executes the command; an
 inactive pane stays the target. No ambient active-pane lookup occurs.
 The result records the new pane and its historical execution context.

## Referenced declarations

- [`LibTmux.Creation.CreatedPane`](/en/haskell/latest/reference/libtmux-creation-t-createdpane/) (typealias)
- [`LibTmux.Snapshot.PaneRef`](/en/haskell/latest/reference/libtmux-snapshot-t-paneref/) (data type)
- [`LibTmux.Server.Server`](/en/haskell/latest/reference/libtmux-server-t-server/) (data type)
- [`LibTmux.Creation.SplitOptions`](/en/haskell/latest/reference/libtmux-creation-t-splitoptions/) (data type)
- [`LibTmux.Creation.WindowSlot`](/en/haskell/latest/reference/libtmux-creation-t-windowslot/) (data type)

## tmux command

The tmux commands behind `splitPane`.

- [`split-window`](/en/tmux/latest/manual/split-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_split_window_entry`](/en/tmux/latest/reference/c-variable-cmd_split_window_entry/) (attribute)
- [`cmd_split_window_exec`](/en/tmux/latest/reference/c-function-cmd-split-window-c-cmd_split_window_exec/) (function)

Each path starts at a function a command runs, which is degree 1. The degree counts steps from there along the path, and each step is a call or a reference: degree 2 is reached from that function, degree 3 from the next, and so on.

### Split a window

1. [`cmd_split_window_exec`](/en/tmux/latest/reference/c-function-cmd-split-window-c-cmd_split_window_exec/) (function)
2. references → [`spawn_pane`](/en/tmux/latest/reference/c-function-spawn_pane/) (function)
3. calls → [`window_add_pane`](/en/tmux/latest/reference/c-function-window_add_pane/) (function)
4. calls → [`window_pane_create`](/en/tmux/latest/reference/c-function-window-c-window_pane_create/) (function)

## Guides

Pages that discuss `splitPane`.

- [Create sessions, windows and panes](/en/haskell/latest/guides/creation/)
- [Implementation status](/en/haskell/latest/guides/status/)
