Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Subversion with MacVim configured as the editor

Tags:

svn

macvim

I'm using Subversion to checkin a file on OSX. I have my EDITOR variable configured to MacVim

My .profile includes:

export EDITOR=/Applications/MacVim/mvim

When I checkin with the -m option (svn ci somefile), MacVim gets launched but then Subversion immediately displays:

Log message unchanged or not specified
(a)bort, (c)ontinue, (e)dit:

It displays this before I get a chance to save my log message in MacVim.

Is there a way to get SVN to use MacVim as the log message editor?

like image 775
Steve Kuo Avatar asked Apr 02 '10 19:04

Steve Kuo


2 Answers

You need to run mvim with the -f flag so that it stays in the foreground. By default, it forks and returns control to the terminal which makes subversion think it is done.

like image 71
jamessan Avatar answered Sep 24 '22 10:09

jamessan


Apple Terminal:

export EDITOR='mvim -f -c "au VimLeave * !open -a Terminal"'

or for iTerm or iTerm2:

export EDITOR='mvim -f -c "au VimLeave * !open -a iTerm"'

From "Faq - macvim - GitHub: How can I use MacVim to edit Git commit messages?". I've confirmed that it works with Subversion, as well.

like image 28
TimZehta Avatar answered Sep 24 '22 10:09

TimZehta