74 lines
2.3 KiB
VimL
Executable File
74 lines
2.3 KiB
VimL
Executable File
" Vim syntax file
|
|
" Language: build logs
|
|
" Maintainer: Julian Ospald
|
|
" Latest Revision: 30 May 2012
|
|
|
|
if exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
" flags
|
|
syn match CFLAGS " -g"
|
|
syn match CFLAGS " -[a-zA-Z][a-zA-Z0-9_\-\,\=\.\/]\+"
|
|
syn match CPPFLAGS " -D[a-zA-Z0-9_\-\,\=\.\/\"]\+"
|
|
syn match LINK " -l[a-zA-Z0-9_\-\,\=\.\/]\+"
|
|
syn match LDFLAGS " -L[a-zA-Z0-9_\-\,\=\.\/]\+"
|
|
syn match LDFLAGS " -Wl,[a-zA-Z0-9_\-\,\=\.\/]\+"
|
|
syn match LDFLAGS " -shared"
|
|
syn match LDFLAGS " -static"
|
|
syn match LDFLAGS " -static[a-zA-Z0-9_\-\,\=\.\/]\+"
|
|
syn match LDFLAGS " -rdynamic"
|
|
syn match INCS " -I[a-zA-Z0-9_\-\,\=\.\/]\+"
|
|
|
|
" files
|
|
syn match SOURCE " [a-zA-Z0-9_\-\,\=\.\/]\+\.c"
|
|
syn match SOURCE " [a-zA-Z0-9_\-\,\=\.\/]\+\.cc"
|
|
syn match SOURCE " [a-zA-Z0-9_\-\,\=\.\/]\+\.cxx"
|
|
syn match SOURCE " [a-zA-Z0-9_\-\,\=\.\/]\+\.cpp"
|
|
syn match SOURCE " [a-zA-Z0-9_\-\,\=\.\/]\+\.h"
|
|
syn match SOURCE " [a-zA-Z0-9_\-\,\=\.\/]\+\.hpp"
|
|
syn match OBJECTS " [a-zA-Z0-9_\-\,\=\.\/]\+\.o"
|
|
syn match LIBS " [a-zA-Z0-9_\,\=\.\/]\+\.a"
|
|
syn match LIBS " [a-zA-Z0-9_\,\=\.\/]\+\.so"
|
|
syn match LIBS " [a-zA-Z0-9_\,\=\.\/]\+\.so[\.0-9]\+"
|
|
syn match TARGETS " -o [a-zA-Z0-9_\-\,\=\.\/]\+"
|
|
|
|
" messages
|
|
syn match cMLogMissing "[\./a-zA-Z0-9_]\+\.[a-zA-Z_]\+: No such .*$"
|
|
syn match cMLogMissing "[\./a-zA-Z0-9_]\+\.[a-zA-Z_]\+: Datei oder Verzeichnis nicht gefunden"
|
|
syn match cMLogMissing "undefined reference to .*$"
|
|
syn match cMLogMissing "Keine Regel vorhanden.*$"
|
|
syn match cMLogCurDir "Entering directory .*$"
|
|
" syn match cMLogCurDir "cd [a-zA-Z0-9_\-\,\=\.\/]\+"
|
|
syn match cMLogWarn "\<[wW]arn[iu]ng.*$"
|
|
syn match cMLogErr "[Ee]rror.*$"
|
|
syn match cMLogErr "No such .*$"
|
|
|
|
" disrespected toolchain
|
|
syn match toolchain "\V\C\<\(-\)\@<!ar\>"
|
|
syn match toolchain "\V\C\<\(-\)\@<!ranlib\>"
|
|
syn match toolchain "\V\C\<\(-\)\@<!cc\>"
|
|
syn match toolchain "\V\C\<\(-\)\@<!gcc\>"
|
|
syn match toolchain "\V\C\<\(-\)\@<!c\>\+++"
|
|
syn match toolchain "\V\C\<\(-\)\@<!g\>\+++"
|
|
|
|
hi cMLogWarn guifg=Red
|
|
hi cMLogErr guifg=Red term=underline cterm=underline gui=underline
|
|
hi cMLogCurDir guifg=Blue
|
|
hi cMLogMissing guifg=Red
|
|
|
|
hi toolchain guifg=Red
|
|
|
|
hi CFLAGS guifg=Green
|
|
hi CPPFLAGS guifg=DarkGreen
|
|
hi LINK guifg=Yellow
|
|
hi LDFLAGS guifg=Orange
|
|
hi INCS guifg=DarkViolet
|
|
hi TARGETS guifg=Brown
|
|
hi LIBS guifg=Brown
|
|
hi OBJECTS guifg=Black
|
|
hi SOURCE guifg=Grey
|
|
|
|
let b:current_syntax = "log"
|
|
|