replace vim with mate as default text editor

99 views
Skip to first unread message

meekish

unread,
Nov 29, 2007, 7:03:30 PM11/29/07
to PeepCode
I'm migrating to Git and would like to view the commit diffs in
TextMate. What environment variable decides the default text editor in
terminal?

topfunky

unread,
Nov 30, 2007, 2:36:14 PM11/30/07
to PeepCode
"The editor used to edit the commit log message will be chosen from
the GIT_EDITOR environment variable, the core.editor configuration
variable, the VISUAL environment variable, or the EDITOR environment
variable (in that order)."

http://www.kernel.org/pub/software/scm/git/docs/git-commit.html

I set EDITOR to "/usr/bin/mate -w" and this seems to take care of most
applications that want to fire up a text editor.

# .bashrc
export EDITOR="/usr/bin/mate -w"

# .cshrc
setenv EDITOR "/usr/bin/mate -w"

If you don't already have the command-line "mate" command installed,
you can go to Help -> Terminal Usage in TextMate to install it.

You can also pipe other output to mate, such as

git diff | mate

Geoffrey Grosenbach
http://peepcode.com

Marze

unread,
Dec 8, 2007, 12:43:20 PM12/8/07
to PeepCode
I can't get this working out
I even tried to replace the core.editor class param from command line
I installed the mate bin in /usr/bin and /usr/local
I also installed from macports git-core
I changed .bashrc and .cshrc

I dunno what's going wrong!
Any advice?

Marze

unread,
Dec 8, 2007, 12:56:54 PM12/8/07
to PeepCode
Oh forget it! I just had to modify .gitconfig
by the way thanx for peepcode! i love it! i have fun and actually, i
learn a lot!

On Dec 8, 6:43 pm, Marze <superage...@gmail.com> wrote:
> I can't get this working out
> I even tried to replace the core.editorclass param from command line
Reply all
Reply to author
Forward
0 new messages