DEV Community

Tiny
Tiny

Posted on • Originally published at tinygame.dev on

Perforce and Notepad++

Increment Notepad

Some Perforce commands will require you to input some info. Operations like changing the permissions with p4 protect or creating a changelist with p4 change for example. An alternative is to the the p4v GUI of course, but occasionally you might want to run them from the command line. In these cases, perforce will launch a text editor for you to make the change in. By default this will be Notepad. If you're on Linux or Mac it will be vi (lucky you), but if you're making games chances are you'll be on Windows.

We can change the editor perforce uses with the P4EDITOR environment variable. Notepad++ is a good option and what I use. For this to behave well though, you'll need to add the -multiInst and -nosession arguments. The former to allow Notepad++ to launch a separate, temporary session exclusively for perforce, and the latter to avoid including all your currently open tabs in this temporary session.

The full command line looks like this: p4 set P4EDITOR="C:\Program Files\Notepad++/Notepad++.exe -multiInst -nosession".

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay