Settings reference

All settings for the P4 for Visual Studio Code extension are configurable in Visual Studio Code Settings by Ctrl+, under Extensions > P4 for VS Code.

Settings marked as (resource) can be configured per folder when using a multi‑root workspace.

All setting keys use the p4. prefix. For example, p4.user. When editing settings.json directly, use the full key names.

Connection

Changes to connection settings take effect after reloading the Visual Studio Code window. Visual Studio Code prompts you to reload when required.

Setting

Description

Default value

p4.user (resource)

Your P4 username. Overrides the P4USER environment variable. Typically set once at the user level so it applies across workspaces.

none

p4.client (resource)

Your P4 client workspace name. Overrides P4CLIENT. Best set at workspace level so each project uses its own client.

none

p4.port (resource)

The P4 Server address, for example ssl:perforce.example.com:1666. Overrides P4PORT. Use the ssl: prefix for SSL-enabled servers.

none

p4.charset (resource)

Character set used for files with P4 filetype unicode or UTF-16. Select a value from the Visual Studio Code Settings UI. Leave unset to inherit P4CHARSET from the environment.

none

p4.enableP4ConfigScanOnStartup

Allows the extension to read connection details from a P4CONFIG file by searching upward from the workspace root. Disable only if startup is slow in very large repositories.

true

File automation

Changes to file automation settings take effect after reloading the Visual Studio Code window.

Setting

Description

Default value

p4.editOnFileSave

Automatically opens a file for edit in P4 when you save it in Visual Studio Code. No effect if the file is already open.

false

p4.addOnFileCreate

Automatically marks new files for add in P4 when you create them in Visual Studio Code.

false

p4.deleteOnFileDelete

Automatically marks files for delete in P4 when deleted in Visual Studio Code. Use with caution.

false

p4.maxFilePerCommand

Limits the number of files sent per P4 command.

32

Changelists and workspace

Setting

Description

Default value

p4.changelistOrder

Controls changelist sort order in the Source Control panel.

descending

p4.changelistSearch.maxResults

Maximum number of changelists shown in the search picker.

200

p4.ignoredChangelistPrefix

Hides changelists whose descriptions start with this prefix.

 

p4.hideShelvedFiles

Hides shelved files under changelists in the Source Control panel.

false

p4.hideEmptyChangelists

Hides changelists with no open files.

false

p4.promptBeforeSubmit

Prompts for confirmation before submitting a changelist.

true

p4.syncMode

Controls what gets synced when running Sync.

whole client

p4.fileShelveMode

Controls how local files are handled when shelving a single file.

prompt

Diff and code review

Setting

Description

Default value

p4.annotate.followBranches

Allows annotations (blame) to follow file history across branches and integrations.

true

p4.editorButtons.diffPrevAndNext

Controls when Previous/Next revision buttons appear in the editor.

All diffable files

p4.swarmHost

URL of your P4 Code Review (Swarm) Server. Enables Open in Swarm links.

 

Explorer and UI

Setting

Description

Default value

p4.countBadge

Controls what the Source Control badge counts.

all-but-shelved

p4.hideNonWorkspaceFiles

Controls visibility of files outside the open workspace folders.

show all files

p4.explorer.showSyncCommands

Shows sync commands in the Explorer context menu.

true

p4.explorer.showBasicOpCommands

Shows Add, Edit, Revert, and Revert Unchanged commands.

true

p4.explorer.showFileOpCommands

Shows Move/Rename and Delete commands.

true

p4.explorer.showReconcileCommand

Shows Reconcile and Reconcile Worskpace commands.

true

Performance and debugging

Setting

Description

Default value

p4.bottleneck.maxConcurrent

Maximum number of concurrent P4 commands. Use lower values to reduce server load.

10

p4.specEditor.showIndentWarning

Warns if spaces are used instead of tabs when editing Perforce specs.

true

p4.errorSeverityLevel

Minimum error severity shown as notifications.

error

p4.debugModeActive

Logs command‑queue details, including the number of pending commands and processing rate, to the Developer Tools console for diagnosing performance issues.

false