ide: Diff files highlighting (thanks Klugier) #835

git-svn-id: svn://ultimatepp.org/upp/trunk@7650 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2014-09-08 09:45:10 +00:00
parent 753a09ad77
commit 7356507a8e
9 changed files with 218 additions and 51 deletions

View file

@ -18,7 +18,13 @@ void CreateTagSyntax(One<EditorSyntax>& e, bool html)
e.Create<TagSyntax>().Html(html);
}
INITBLOCK {
void CreateDiffSyntax(One<EditorSyntax>& e)
{
e.Create<DiffSyntax>();
}
INITBLOCK
{
RegisterCSyntax("cpp", CSyntax::HIGHLIGHT_CPP,
"*.c *.cpp *.cc *.cxx *.h *.hpp *.hh *.hxx *.m *.mm *.icpp *.conf",
"C/C++");
@ -36,6 +42,8 @@ INITBLOCK {
EditorSyntax::Register("xml", callback1(CreateTagSyntax, false), "*.xml *.xsd", "XML (.xml)");
EditorSyntax::Register("html", callback1(CreateTagSyntax, true), "*.html *.htm", "HTML (.html)");
EditorSyntax::Register("diff", callback(CreateDiffSyntax), "*.diff *.patch", "Diff");
}
END_UPP_NAMESPACE