Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2008-03-23 16:19:12
Size: 887
Editor: abuehl
Comment: moved from TipsAndTricks/Intermediate
Revision 5 as of 2013-09-01 09:44:29
Size: 959
Editor: LetaBurre
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== See diffs when editing commit message with VIM ==

Make a private copy of the ["hgeditor"] script provided with mercurial and replace the call to the editor with following command:

{{{
vim "+e $HGTMP/diff" '+set buftype=help filetype=diff' "+vsplit $HGTMP/msg" || exit $?
}}}

This will start up VIM in vertical split mode with commit message in the left pane and diff in the right pane. The {{{buftype=help}}} setting for diff window tells vim to exit when all other windows are closed, so when you write and quit the log with {{{:x}}} ({{{:wq}}} - they are equivalent), vim exits. If you have syntax highlight set up, the diff will be properly highlighted.

This setting is suitable for wide terminals. If you have a narrow terminal, you may want to replace the {{{+vsplit}}} above with {{{+split}}} or add {{{nowrap}}} to the {{{+set}}}.

----
CategoryTipsAndTricks
Play [[http://minecraft4freeonline.com/cat/0/all/newest/p1.html|All Games]] [[http://minecraft4freeonline.com/cat/1/minecraft-games/newest/p1.html|Minecraft Games]] [[http://minecraft4freeonline.com/cat/2/games-like-minecraft/newest/p1.html|Games Like Minecraft]] [[http://minecraft4freeonline.com/cat/3/action/newest/p1.html|Action]] [[http://minecraft4freeonline.com/cat/4/adventure/newest/p1.html|Adventure]] [[http://minecraft4freeonline.com/cat/5/strategy/newest/p1.html|Strategy]] at [[http://minecraft4freeonline.com|http://minecraft4freeonline.com]]<<BR>>
Minecraft Four Free On the internet is dependant on Minecraft Game. Stage, tactic, my very own, hobby, obstructs, make or protection your personal base, play minecraft for free and much more games such as minecraft!<<BR>>
<<BR>>
{[[http://minecraft4freeonline.com/|Minecraft for free]]|[[http://minecraft4freeonline.com/|Free Minecraft]]|[[http://minecraft4freeonline.com/|Minecraft free]]|

Play All Games Minecraft Games Games Like Minecraft Action Adventure Strategy at http://minecraft4freeonline.com
Minecraft Four Free On the internet is dependant on Minecraft Game. Stage, tactic, my very own, hobby, obstructs, make or protection your personal base, play minecraft for free and much more games such as minecraft!

{Minecraft for free|Free Minecraft|Minecraft free|

DiffsInCommitMessageInVIM (last edited 2014-11-04 19:45:54 by techtonik)