Edit files
To modify a file in your workspace, you must first open it for edit. Opening a file for edit adds it to a default changelist and allows you to save changes.
On this page:
Open a file for edit
-
In Visual Studio Code, select Explorer, right‑click the file you want to edit.
-
Select P4 > Edit file.
The file is opened for edit and appears in your default changelist under Changes in the Source Control view. To move a file from default changelist to another pending changelist, see Edit the full changelist spec.
Automatically open files for edit on save
You can configure the extension to automatically open files for edit when you save them.
-
In Visual Studio Code, select the Settings
icon and Settings. The Settings dialog box opens. -
Under Extensions > P4 VS Code> P4, select P4: Edit On File Save to enable.
When this option is enabled, the extension opens the file for edit automatically when you save it.