Change SVN editor to Vim or TextWrangler

When you check-in to SVN with svn ci, the default editor opens to allow you to enter your commit message. My default editor was Emacs. I don’t use Emacs for anything else, and I found entering a simple message a tad frustrating as Emacs commands/shortcuts are different to what I use with Vim.

Enough is enough, time to change.

So, to change the default editor to Vim, simply enter the following command into your ~/.bash_rc or ~/.bash_profile file, then close and reopen your bash window.

export SVN_EDITOR=vim

Note: Here is a comprehensive guide to basic SVN commands which among other things, shows you how to set up SVN to use TextWrangler as your default editor – https://weblion.psu.edu/trac/weblion/wiki/SubversionBasics

One thought on “Change SVN editor to Vim or TextWrangler

  1. Although setting ENV is nice but I personally prefer changing the config file for svn.

    in ~/.subversion/config file under [helpers]

    you can set:
    editor-cmd = vim

    You can read the comments there for other options or info.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s