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

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/Creation.swift#L234
- **Page:** https://libtmux.org/en/swift/latest/reference/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`
