More harmonious cmake/g++ themes

CMake theme less colorful, in cyan/green, color errors.
Better g++ messages parsing.
This commit is contained in:
Johann Dreo 2013-03-26 23:38:16 +01:00
commit 3a51a71014
2 changed files with 39 additions and 11 deletions

View file

@ -1,16 +1,42 @@
def theme(): def theme():
# CMake theme:
# actions performing in cyan
performing="cyan"
# actions performed in green
performed="green"
th = [ th = [
# Configure...
[ "^--.*works", performed ],
[ "^--.*done", performed ],
[ "^-- Found.*NO", "red" ],
[ "^-- Found.*", performed ],
[ "^--.*broken", "red" ],
[ "^-- Coult NOT find.*", "red" ],
[ "^-- Configuring incomplete, errors occurred!", "red" ],
[ "^--.*", performing ],
# Errors
[ "CMake Error:", "red" ],
[ "CMake Warning", "yellow" ],
# Scan
[ "^(Scanning dependencies of target)(.*)$", [ "^(Scanning dependencies of target)(.*)$",
"magenta,blue", "normal,bold" ], performing, "normal,bold" ],
[ "^(Linking \w+ \w+ library)(\s.*/)(\w+.[aso]+)$", # Link
"magenta", "normal,normal,bold" ], [ "^(Linking .* (library|executable) )(.*/)+(.+(\.[aso]+)*)$",
performing, "normal,normal,bold" ],
# [percent] Built
[ "^\[\s*[0-9]+%\]\s(Built target)(\s.*)$", [ "^\[\s*[0-9]+%\]\s(Built target)(\s.*)$",
"cyan,blue", "normal,bold" ], performed, "normal,bold" ],
[ "^\[\s*[0-9]+%\]\s(Building \w* object)(\s.*/)(\w+.cpp)(.o)$", # [percent] Building
"green", "normal,normal,bold,normal"] [ "^\[\s*[0-9]+%\]\s(Building \w* object)(\s.*/)(\w+.c.*)(.o)$",
performing, "normal,normal,bold,normal"],
# make errors
[ "make\[[0-9]+\].*", "yellow"],
[ "(make:.*)(Error [0-9]+)", "red", "normal,bold"]
] ]
# Percentages: rainbow from magenta to red, depending on the number
percs={ percs={
"\s":("magenta","normal"), "\s":("magenta","normal"),
"1":("magenta","normal"), "1":("magenta","normal"),

View file

@ -1,12 +1,14 @@
def theme(): def theme():
return [ return [
[ "error", "red", "bold" ], [ "(fatal )*(error)", "red", "bold" ],
[ "warning", "magenta", "bold" ], [ "warning", "magenta", "bold" ],
[ "\[-W.*\]", "magenta", "normal" ],
[ "note", "blue", "bold" ], [ "note", "blue", "bold" ],
[ ":([0-9]+):[0-9]*", "yellow", "normal" ], # [-Wflag]
[ "^((/\w+)+)\.(h|cpp)", "white", "normal" ], [ "\[-W.*\]", "magenta"],
[ "'(.*)'", "Cpp", "monokai" ], # Filename:line number
[ "(/.*?)/([^/]+\.)(h|cp*):([0-9]+):*[0-9]*(.*)", "white,white,white,yellow,none", "normal,bold,bold,normal"],
# source code in single quotes
[ "'(.*)'", "Cpp", "monokai" ]
] ]