Change directory for tab page
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Change directory for tab page.
Directory scope
- Global cwd
/demo- Current tab
inherits /demo- Other tab
inherits /demo- Current window
no window-local override
Command entered · ready to apply
Directory scope
- Global cwd
/demo- Current tab
inherits /demo- Other tab
inherits /demo- Current window
no window-local override
Sets the current tab's working directory, which its current window uses. The other tab and global directory keep /demo.
Directory scope
- Global cwd
/demo- Current tab
/demo/project- Other tab
inherits /demo- Current window
uses /demo/project
Before & after
Before
Directory scope
- Global cwd
/demo- Current tab
inherits /demo- Other tab
inherits /demo- Current window
no window-local override
After
Directory scope
- Global cwd
/demo- Current tab
/demo/project- Other tab
inherits /demo- Current window
uses /demo/project
Subject: :tcd. Documentation-backed illustration; assumes existing fixture directory /demo/project and no current window-local directory; not replay-verified. Sets the current tab's working directory, which its current window uses. The other tab and global directory keep /demo.
notesCursor on line 1, column 1Details & Vim help
Change directory for tab page. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :tc[d] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.