# P4EDITOR

The editor invoked by Helix 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, OS X

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, OS X:

`export EDITOR=/usr/bin/vi`

On Windows:

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

Tip

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

The regular Helix Server commands that use forms (and therefore, use this variable), are `p4 branch`, `p4 change`, `p4 client`, `p4 job`, `p4 label`, `p4 submit`, and `p4 user`.

The superuser commands that use forms are `p4 depot`, `p4 group`, `p4 jobspec`, `p4 protect`, `p4 triggers`, and `p4 typemap`.