p4 change not working with gvim

1.8k views Asked by At

I use perforce as source code repository. p4 change command is used to create a changelist of opened files. If I set setenv EDITOR gvim and then run this command then gvim opens and I add some description and then save and quit. I get below error. Same error does not come if EDITOR is not set, I mean in that case vim opens. Any idea to fix this issue?

sachina@inn-sachina-vm[285] p4 change
Error in change specification.
Error detected at line 29.
Change description missing.  You must enter one.
Hit return to continue...
1

There are 1 answers

0
Ingo Karkat On BEST ANSWER

Applications that invoke EDITOR assume that the command blocks until editing is done and the editor was closed. While true for vim, the GUI version gvim launches in the background; i.e. the command returns immediately.

You can avoid this via the :help -f command-line option:

setenv EDITOR 'gvim -f'