# Server.split(_:direction:size:startDirectory:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Creation.swift#L209
- **Page:** https://libtmux.org/reference/swift/server-split(_-direction-size-startdirectory-)/

```
Server.split(_:direction:size:startDirectory:)(pane: Pane, direction: PaneDirection, size: PaneSize?, startDirectory: String?) -> Pane
```

Splits one pane, returning the pane that appeared.

The same call as ``splitWindow(_:direction:size:startDirectory:)`` with
the ambiguity removed: a window has an active pane and tmux splits that
one, which is what you want interactively and rarely what you want when
building a layout.

## Raises

- `TmuxError`
