Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.2

# P4EDITOR

The editor invoked by P4 Server commands that use forms.

## Usage notes

Used by Client? | Used by Server? | Command-Line Alternative | Can be set in P4CONFIG file?
--- | --- | --- | ---
Yes | No | None | Yes

## Value if not explicitly set

Operating System | Value
--- | ---
Linux, UNIX, macOS | If `EDITOR` is set to any value, then the value of `EDITOR`, otherwise, `vi`.
Windows | If `P4EDITOR` is set to any value, then the value of `P4EDITOR`, otherwise, `Notepad`.

## Examples

On Linux, UNIX, macOS:

`export EDITOR=/usr/bin/vi`

On Windows:

`p4 set P4EDITOR="C:\Program Files\TextPad 8\TextPad.exe"`

If `P4EDITOR` is not set, the operating system's default text editor is used. To use a different text editor, set `P4EDITOR` to the appropriate executable. Some text editors require additional flags to ensure proper interaction. For example, the Notepad++ text editor works best with the `-nosession -multiInst` options:
`p4 set P4EDITOR="C:\Program Files (x86)\Notepad+\notepad+.exe -nosession -multiInst"`

## Notes

`P4EDITOR` is used by P4 Server commands that use forms, such as:

- For regular users: `p4 branch`, `p4 stream`, `p4 change`, `p4 client`, `p4 job`, `p4 label`, `p4 submit`, and `p4 user`.

- For users with `admin` or greater access: `p4 depot`, `p4 group`, `p4 jobspec`, `p4 protect`, `p4 triggers`, and `p4 typemap`.

Your search for returned results