# window.Window.move

- **Module:** window
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/window.ts#L425
- **Page:** https://libtmux.org/en/ts/latest/reference/window-window-move/

```
move(options: MoveWindowOptions = {}): Promise<void>
```

Move this window to another session or index without selecting it.

Moves this placement. Sessions that are grouped share one window list, so
moving a window they share moves it in all of them; sessions that merely
link the same window keep their own lists, and only this one moves.

## Examples

```ts
await window.move({ index: 3 });
```

## Parameters

- `options` (`MoveWindowOptions`)
  Default: `{}`.

## tmux command

The tmux commands behind `move`.

- [`move-window`](/en/tmux/latest/manual/move-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_move_window_entry`](/en/tmux/latest/reference/c-variable-cmd_move_window_entry/) (attribute)
- [`cmd_move_window_exec`](/en/tmux/latest/reference/c-function-cmd-move-window-c-cmd_move_window_exec/) (function)

## In other ports

Move a window to another session or index

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.move_window`](/en/py/latest/reference/libtmux-window-move_window/) (method) |
| Lua | [`libtmux.WindowLink:move`](/en/lua/latest/reference/libtmux-windowlink-move/) (method) |
| Rust | [`window.Window.move_to`](/en/rs/latest/reference/window-window-move_to/) (method) |
| Go | [`tmux.Window.Move`](/en/go/latest/reference/tmux-window-move/) (method) |
| Java | [`io.github.libtmux.Window.moveTo`](/en/java/latest/reference/io-github-libtmux-window-window-moveto/) (method) |
| C# | [`LibTmux.Window.MoveAsync`](/en/csharp/latest/reference/libtmux-window-moveasync/) (method) |
| C++ | [`libtmux::Window::move_to`](/en/cxx/latest/reference/libtmux-window-move_to/) (method) |
| Swift | [`Server.move(_:to:at:)`](/en/swift/latest/reference/server-move(_-to-at-)/) (method) |

No equivalent is recorded in Ruby, PowerShell, Julia, Elixir, Kotlin, Scala or F#.
