# tmux.Plan.NewWindow

- **Module:** tmux.Plan
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/52968a3181c1c9e6d1b26c565d4b170968ae61c0/tmux/plan_window.go#L12
- **Page:** https://libtmux.org/en/go/latest/reference/tmux-plan-newwindow/

```
tmux.Plan.NewWindow(target: Ref, request: NewWindowRequest) -> Ref
```

NewWindow records a window created in the session or beside the window that target names, and returns a [Ref] to it.

SelectExisting is rejected: it asks tmux for an existing window's
expanded name before creating anything, and a plan records without reading.
