Perforce changing the default editor

前端 未结 6 1236
轮回少年
轮回少年 2021-02-20 14:20

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 ged

相关标签:
6条回答
  • 2021-02-20 14:29

    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.

    0 讨论(0)
  • 2021-02-20 14:30

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

    0 讨论(0)
  • 2021-02-20 14:32

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

    p4 set P4EDITOR="C:\Program Files (x86)\Notepad++\notepad++.exe -multiInst"
    
    0 讨论(0)
  • 2021-02-20 14:36

    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 !!!

    0 讨论(0)
  • 2021-02-20 14:40

    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

    0 讨论(0)
  • 2021-02-20 14:48

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

    0 讨论(0)
提交回复
热议问题