[MacPorts] CommitMessages modified

MacPorts noreply at macports.org
Thu Dec 22 01:54:41 CET 2016


Page "CommitMessages" was changed by mkae
Diff URL: <https://trac.macports.org/wiki/CommitMessages?action=diff&version=19>
Revision 19
Comment: Rainer's colorization trick
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: CommitMessages
=========================================================================
--- CommitMessages (version: 18)
+++ CommitMessages (version: 19)
@@ -95,7 +95,18 @@
 $ git config --global core.editor ed
 }}}
 
+
+In case you're using {{{vim}}} as your favorite editor you might want to enable colorizing the commit messages according to the required formatting rules w.r.t. characters in the first and subsequent lines like this:
 {{{
-#!div style="background-color: lightyellow; padding: 0.25em;"
-TODO: Add per-editor information. (For {{{vi}}} include Rainer's colorization trickery for {{{gitcommitOverflow}}}!)
+filetype plugin indent on
+hi def link gitcommitOverflow Error
+
+autocmd BufEnter *
+   \ if &textwidth > 0 |
+       \ exec 'match Overlength /\%>' . &textwidth . 'v.\+/' |
+   \ endif
+hi def link Overlength Error
+" or customize it with other colors
+" "hi OverLength ctermbg=LightRed guibg=LightRed
 }}}
+which needs to be saved in {{{~/.vimrc}}}.
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/CommitMessages>
MacPorts <https://www.macports.org/>
Ports system for macOS

This is an automated message. Someone added your email address to be
notified of changes on 'CommitMessages' page.
If it was not you, please report to admin at macports.org.


More information about the macports-changes mailing list