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():
# CMake theme:
# actions performing in cyan
performing="cyan"
# actions performed in green
performed="green"
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)(.*)$",
"magenta,blue", "normal,bold" ],
[ "^(Linking \w+ \w+ library)(\s.*/)(\w+.[aso]+)$",
"magenta", "normal,normal,bold" ],
performing, "normal,bold" ],
# Link
[ "^(Linking .* (library|executable) )(.*/)+(.+(\.[aso]+)*)$",
performing, "normal,normal,bold" ],
# [percent] Built
[ "^\[\s*[0-9]+%\]\s(Built target)(\s.*)$",
"cyan,blue", "normal,bold" ],
[ "^\[\s*[0-9]+%\]\s(Building \w* object)(\s.*/)(\w+.cpp)(.o)$",
"green", "normal,normal,bold,normal"]
performed, "normal,bold" ],
# [percent] Building
[ "^\[\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={
"\s":("magenta","normal"),
"1":("magenta","normal"),

View file

@ -1,12 +1,14 @@
def theme():
return [
[ "error", "red", "bold" ],
[ "(fatal )*(error)", "red", "bold" ],
[ "warning", "magenta", "bold" ],
[ "\[-W.*\]", "magenta", "normal" ],
[ "note", "blue", "bold" ],
[ ":([0-9]+):[0-9]*", "yellow", "normal" ],
[ "^((/\w+)+)\.(h|cpp)", "white", "normal" ],
[ "'(.*)'", "Cpp", "monokai" ],
# [-Wflag]
[ "\[-W.*\]", "magenta"],
# 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" ]
]