# LibTmux::Pane#split

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/dcc9f8b5a6970144a9e7d80cd5f381d8f6198372/gems/libtmux/lib/libtmux/entity.rb#L164
- **Page:** https://libtmux.org/en/ruby/v0.1.0.alpha.2/reference/libtmux-pane-split/

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

```
def split: (
  direction: :horizontal | :vertical,
  command: ::Array[::String],
  ?size: ::Integer | ::String | nil,
  ?cwd: ::String?,
  ?environment: ::Hash[::String, ::String],
  ?focus: bool,
  ?timeout: ::Numeric,
  ?cancel: untyped
) -> ::LibTmux::Pane
```

Behavior: Creation.

Behavior contract: Creation.

## In other ports

### Split a pane in two

- Python: [`libtmux.Pane.split`](/en/py/latest/reference/libtmux-pane-split/) (method)
- Lua: [`libtmux.Pane:split`](/en/lua/latest/reference/libtmux-pane-split/) (method)
- 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.Pane.split`](/en/java/latest/reference/io-github-libtmux-pane-pane-split/) (method)
- C#: [`LibTmux.Pane.SplitAsync`](/en/csharp/latest/reference/libtmux-pane-splitasync/) (method)
- Swift: [`Server.split(_:direction:size:startDirectory:)`](/en/swift/latest/reference/server-split(_-direction-size-startdirectory-)/) (method)
- 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)
