Vim Recall繁體中文

Change directory

:cd

Example

Normal 0 / 2

Change directory.

Working directories

Global
/example/project
Window 1
/example/project
Window 2
/example/project
Before & after

Before

Working directories

Global
/example/project
Window 1
/example/project
Window 2
/example/project

After

Working directories

Global
/example/project/src
Window 1
/example/project/src
Window 2
/example/project/src

Documentation-backed illustration. /example/project/src exists; window 1 is current; no prior tab/window local directories. Change the global directory to the existing src directory. Both windows inherit the new global directory. Primary help: :cd.

Sample buffer
alpha
beta
gamma
Cursor on line 1, column 1
Details & Vim help

Change directory. 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. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.