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".

Top comments (0)

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, cherished by the supportive DEV Community. Coders of every background are encouraged to bring their perspectives and bolster our collective wisdom.

A sincere “thank you” often brightens someone’s day—share yours in the comments below!

On DEV, the act of sharing knowledge eases our journey and forges stronger community ties. Found value in this? A quick thank-you to the author can make a world of difference.

Okay