# LibTmux::Window#split

- **Module:** LibTmux
- **Package:** libtmux
- **Language:** Ruby
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ruby/blob/dcc9f8b5a6970144a9e7d80cd5f381d8f6198372/gems/libtmux/lib/libtmux/entity.rb#L126
- **Page:** https://libtmux.org/en/ruby/v0.1.0.alpha.2/reference/libtmux-window-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 window's active pane

- Python: [`libtmux.Window.split`](/en/py/latest/reference/libtmux-window-split/) (method)
- TypeScript: [`window.Window.split`](/en/ts/latest/reference/window-window-split/) (method)
- Rust: [`window.Window.split`](/en/rs/latest/reference/window-window-split/) (method)
- Go: [`tmux.Window.SplitPane`](/en/go/latest/reference/tmux-window-splitpane/) (method)
- Java: [`io.github.libtmux.Window.Window.split`](/en/java/latest/reference/io-github-libtmux-window-window-split/) (method)
- C#: [`LibTmux.Window.SplitPaneAsync`](/en/csharp/latest/reference/libtmux-window-splitpaneasync/) (method)
- C++: [`libtmux::Window::split`](/en/cxx/latest/reference/libtmux-window-split/) (method)
- Swift: [`Server.splitWindow(_:direction:size:startDirectory:)`](/en/swift/latest/reference/server-splitwindow(_-direction-size-startdirectory-)/) (method)
- Kotlin: [`io.github.libtmux.kotlin.Window.split`](/en/kotlin/latest/reference/io-github-libtmux-kotlin-window-split/) (method)
- Scala: [`io.github.libtmux.scaladsl.Window.split`](/en/scala/latest/reference/io-github-libtmux-scaladsl-window-split/) (method)
