# LibTmux::Model::PaneRef.split

- **Module:** LibTmux::Model
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/e76160bcce6e03976d49424da15b7c31afb2c68e/lib/LibTmux/Model.rakumod#L279
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-model-paneref-split/

```
method split(Bool :$horizontal = False, Bool :$before = False,
                 Bool :$full = False, Bool :$select = False, Bool :$preserve-zoom = False,
                 :$size = Positive, :$percent = Positive, Str :$directory,
                 Str :$shell-command, Bool :$empty = False,
                 Associative:D :$environment = Map.new --> PaneRef:D)
```

Create a detached split by default, returning the reported pane ID.

Create a detached split by default, returning the reported pane ID.

## Parameters

- `$horizontal?` (`Bool`)
- `$before?` (`Bool`)
- `$full?` (`Bool`)
- `$select?` (`Bool`)
- `$preserve-zoom?` (`Bool`)
- `$size?`
- `$percent?`
- `$directory?` (`Str`)
- `$shell-command?` (`Str`)
- `$empty?` (`Bool`)
- `$environment?` (`Associative:D`)

## tmux command

The tmux commands behind `split`.

- [`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)

## In other ports

Split a pane in two

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Pane.split`](/en/py/latest/reference/libtmux-pane-split/) (method) |
| Ruby | [`LibTmux::Pane#split`](/en/ruby/latest/reference/libtmux-pane-split/) (method) |
| Lua | [`libtmux.Pane:split`](/en/lua/latest/reference/libtmux-pane-split/) (method) |
| Erlang | [`tmux_pane:split/2`](/en/erlang/latest/reference/tmux_pane-split-2/) (function) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`pane.Pane.split`](/en/ts/latest/reference/pane-pane-split/) (method) |
| Rust | [`pane.Pane.split`](/en/rs/latest/reference/pane-pane-split/) (method) |
| Go | [`tmux.Pane.Split`](/en/go/latest/reference/tmux-pane-split/) (method) |
| Java | [`io.github.libtmux.Pane.split`](/en/java/latest/reference/io-github-libtmux-pane-pane-split/) (method) |
| Clojure | [`libtmux.core/split-pane!`](/en/clojure/latest/reference/libtmux-core-split-pane/) (function) |
| Kotlin | [`io.github.libtmux.kotlin.Pane.split`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-pane-split/) (method) |
| Scala | [`io.github.libtmux.scaladsl.Pane.split`](/en/scala/latest/reference/io-github-libtmux-scaladsl-pane-split/) (method) |
| C# | [`LibTmux.Pane.SplitAsync`](/en/csharp/latest/reference/libtmux-pane-splitasync/) (method) |
| C++ | no direct pane target; Window.split splits the active pane |
| Swift | [`Server.split(_:direction:size:startDirectory:environment:shell:)`](/en/swift/latest/reference/server-split(_-direction-size-startdirectory-)/) (method) |
| OCaml | [`Libtmux_unix.Client.split_pane`](/en/ocaml/latest/reference/libtmux_unix-client-split_pane/) (function) |
| Perl | [`LibTmux::Server::split_pane`](/en/perl/latest/reference/libtmux-server-split_pane/) (method). Explicit Server operation. Captured entities remain local observations; use a new snapshot to observe changes. |

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