Snippets are tiny notes I've collected for easy reference.
Simple emacs mode for .gitignore files.
Through the power of generic-mode, adding the following lines to your .emacs
file will add syntax-coloring support for .gitignore
, .svnignore
, etc. files. And by "syntax-coloring" I mean that lines that start with a #
will be marked as comments.
(require 'generic-x)
(add-to-list 'auto-mode-alist '("\\..*ignore$" . hosts-generic-mode))
Actually, any text after an un-escaped #
will be marked as a comment, which isn't the way Git and SVN interpret those files. (TODO: it would be pretty simple to add a dot-ignore-generic-mode that handles this correctly.)
Published 13 May 2013
Snippets are tiny notes I've collected for easy reference.