# plan.ops.panes.SplitWindow.direction

- **Module:** plan.ops.panes.SplitWindow
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/plan/ops/panes.rs#L129
- **Page:** https://libtmux.org/en/rs/latest/reference/plan-ops-panes-splitwindow-direction/

```
plan.ops.panes.SplitWindow.direction(mut, direction: SplitDirection) -> Self
```

Put the new pane on this side of the one being divided.

The default is [`SplitDirection::Below`], which is tmux's. `Above` and
`Left` need tmux's `-b`, so they are reachable only through this: with
[`SplitWindow::horizontal`] alone a plan could ask for two of the four
positions, while the object API's [`crate::SplitOptions`] has always
offered all four.

## Example

```rust
use libtmux::SplitDirection;
use libtmux::plan::{NewSession, Plan, SplitWindow};

let mut plan = Plan::new();
let session = plan.add(NewSession::new("above"));
plan.add(SplitWindow::new(session.window()).direction(SplitDirection::Above));

assert_eq!(plan.len(), 2);
```
