Using TextMate as Mercurial’s Editor

Much like with Git, its easy to use TextMate as the editor that Mercurial will use for commit messages.

  1. Open your ~/.hgrc file (create it if it doesn’t exist).
  2. Add this entry to the [ui] section:
     [ui] editor = mate -w 
  3. Save the ~/.hgrc file

Next time you do hg commit TextMate will open a temporary file you write your commit message into. Type your message, save the file and then close the window to finish the commit. The -w flag on the mate command tells TextMate not to return control to the command line until the editor window has been closed.

32 notes

Show

  1. vincecima posted this

Blog comments powered by Disqus