Differences between revisions 4 and 5
Revision 4 as of 2012-10-01 17:36:32
Size: 803
Editor: host211-81-dynamic
Comment: Added information on the actual behaviour on windows
Revision 5 as of 2015-11-11 09:07:17
Size: 802
Editor: SashaUnknown
Comment: Typo fix
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
Thus, if you want to ovverride it, you either have to redefine the configuration option or use an {{{HGEDITOR}}} environment variable ({{{VISUAL}}} and {{{EDITOR}}} will be ignored). Thus, if you want to override it, you either have to redefine the configuration option or use an {{{HGEDITOR}}} environment variable ({{{VISUAL}}} and {{{EDITOR}}} will be ignored).

Mercurial tries to pick which program to call to edit a commit message by trying the following (in order):

  1. HGEDITOR environment variable

  2. editor configuration option in [ui] section (in hgrc or passed with --config ui.editor command-line option).

  3. VISUAL environment variable

  4. EDITOR environment variable

  5. vi, if none of the above is set

On Windows, the installer places a configuration file inside %programfiles%\Mercurial\hgrc.d\ that contains the editor settings (notepad by default). Thus, if you want to override it, you either have to redefine the configuration option or use an HGEDITOR environment variable (VISUAL and EDITOR will be ignored).

See also

editor (last edited 2015-11-11 09:07:17 by SashaUnknown)