Under *nix I can set SVN_EDITOR
to gvim --nofork
to do the trick, but that doesn't seem to work under Windows. Is there any solution for that?
If you have installed the batch files (c:\windows\gvim.bat), just set EDITOR
to gvim -f
, the batch file processes the -f argument and sets the no-fork option.
The trick in the batch file is running START /WAIT path\to\gvim.exe %*
(see the /WAIT argument).
If you don't have the batch files, just create a new one with the command above, and set EDITOR
to the newly create batch file.
This answer was written for Git, but should directly apply.
To make this work, try the following.
svn_editor.bat
) which contains the following:"path/to/gvim.exe" --nofork "%*"
svn_editor.bat
on your PATH
.SVN_EDITOR=svn_editor.bat
With this done, SVN should correctly invoke the gvim executable.
NOTE 1: The --nofork option to gvim insures that it blocks until the commit message has been written.
NOTE 2: The quotes around the path to gvim is required if you have spaces in the path.
NOTE 3: The quotes around "%*" are needed just in case git passes a file path with spaces.
If the problem is passing parameters to prevent forking to gvim (your question was a little vague), then you can either create a batch file that calls gvim with the required parameters or you could simply add the following to your vimrc
(NOT gvimrc
) and point SVN_EDITOR
at gvim.exe
:
set guioptions+=f
This tells vim not to fork when creating the GUI and has the advantage of not having to mess around with batch files. For more information, see:
:help gui-fork
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With