Thread (7 messages) flat view 7 messages, 6 authors, 2016-06-15

Re: call external editor from git-gui?

From: Mike Ralphson <hidden>
Date: 2016-06-15 22:43:29

It seems quite common to have a trio of environment variables:
$EDITOR, $VISUAL and $XEDITOR, for line, tty-aware and graphical
editors respectively.

[http://xdvi.sourceforge.net/inverse-search-emacs-noauctex.html]
[http://lists.osuosl.org/pipermail/darcs-users/2006-December/010783.html]

Whether git needs to have a trio of overrides for them is a different
matter, or could just recommend that git be aliased or wrapped if the
editors needed for git are different to normal.

Cheers, Mike

On 8/15/07, David Kastrup [off-list ref] wrote:
The usual convention (though _very_ hard to find anywhere explicitly,
so it might more often than not be ignored) is that $VISUAL points to
an editor that requires a tty to work on, while $EDITOR might get
along without one.

So one uses VISUAL in preference of EDITOR on ttys/proper terminals,
but only EDITOR when without one.  A call from git-gui would probably
fall in the second category.  A call from tig, in contrast, in the
first category.

The GIT_EDITOR variable has no way of expressing this difference,
though.  And I doubt that many people remember this.  I googled around
but failed to come up with a useful reference (of course, both
variable names being common words does not exactly help).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help