Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perforce changing the default editor

Tags:

perforce

I use perforce for my revision control, when I hit 'p4 change' it always opens up the list on emacs, and we all know the pain of deleting text in it. How do i change it to gedit or vim or anything else? My default text editor is gedit.

like image 731
Aadi Droid Avatar asked Apr 11 '12 16:04

Aadi Droid


2 Answers

On the command line, set P4EDITOR either as an environment variable or in the P4CONFIG file.

like image 148
randy-wandisco Avatar answered Oct 05 '22 06:10

randy-wandisco


From the command line,

p4 set P4EDITOR="C:\File Editor\editor.exe"

You can test that this was successfull by running the following command after, which should launch your desired editor.

p4 workspace

like image 25
Dave Kennedy Avatar answered Oct 05 '22 04:10

Dave Kennedy