Perforce changing the default editor

岁酱吖の 提交于 2019-12-09 17:04:48

问题


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.


回答1:


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




回答2:


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




回答3:


I had similar problem on my Windows system.
It always used to open clumsy notepad. I am more comfortable with TextPad, so to change default perforce editor, I made following changes: I opened System Properties and added new environment variable as following:

Name: `P4EDITOR` 
Value: `C:\Program Files (x86)\TextPad 4\TextPad.exe`

After that open a new CMD and there you go !!!




回答4:


For Notepad++ I needed to use this command -multiInst to trigger edits.

p4 set P4EDITOR="C:\Program Files (x86)\Notepad++\notepad++.exe -multiInst"



回答5:


Try setting the EDITOR environment variable. Also, the command line p4 should have an option to specify an editor. Also, the .p4config file might have something as well.




回答6:


Also need to check if EDITOR/P4EDITOR path is correct. If path is wrong, perforce will choose previously working editor.



来源:https://stackoverflow.com/questions/10110052/perforce-changing-the-default-editor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!