Created
January 18, 2022 15:54
-
-
Save pholat/8eaedcfa9c64096a0d5d40bbdda82ce5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add to .vimrc: `au BufRead,BufNewFile *.log set filetype=log` and open `.log` files with colors | |
if exists("b:current_syntax") | |
finish | |
endif | |
let b:current_syntax = "log" | |
syntax match EVT "event:" | |
" [ServiceBluetooth_w1] GAP.cpp:addNewDevice:181: | |
syn match serviceDesc '\[[a-zA-Z0-9_]*\]' nextgroup=fileDesc "contains=syntaxElement1 skipwhite | |
syn match fileDesc / [a-zA-Z]*\.[a-z]\{3\}:/ nextgroup=fooDesc "contains=syntaxElement1 nextgroup=syntaxElement2 skipwhite | |
syn match fooDesc /[a-zA-Z]*:/ nextgroup=lineDesc "contains=syntaxElement1 nextgroup=syntaxElement2 skipwhite | |
syn match lineDesc /[0-9]*:/ "contains=syntaxElement1 nextgroup=syntaxElement2 skipwhite | |
syn keyword ERROR ERROR | |
highlight EVT ctermfg=red cterm=bold | |
highlight serviceDesc ctermfg=darkblue cterm=bold | |
highlight fileDesc ctermfg=6 | |
highlight fooDesc ctermfg=28 | |
highlight lineDesc ctermfg=89 | |
highlight ERROR ctermfg=darkred cterm=bold |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment