# 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/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/plan_window.go#L12
- **Page:** https://libtmux.org/reference/go/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.
