cygwin: vim custom syntax highlighting not working -
I have a set of log files that have standard formats. I have created a custom syntax file for these logs, and It works fine on Linux system.
However, I can not get it to work in Sigwin. I have the following .vimrc file in my home directory:
and BufRead, BufNewFile rc.log * set Filetype = rclog au! : syn syntax rclog source ~ / .vim / log.vim
and in ~ / .vim / i have log.vim on syntax LogTime start = + ^ \ d \ {4} - \ d \ {2} - \ d \ {2} \ d \ {2}: \ d \ {2}: \ d \ {2} + end = + I = E-1: Sync keyword log error error skipwhite nextgroup = logThreadName: sync keyword logwarn Warne skipwhite nextgroup = logThreadName: syn keyword loginfoden information skipwhite nextgroup = logThreadName: syn keyword logdebug debue skipwhite nextgroup = logThreadName: syn keyword log always always skipwhite nextgroup = LogThreadName: Match syng to loggroupName "syn \" \ "\ s \ +:" nextgroup = l OgLineNumber: syn match logLineNumber "\ d \ +" Hi contained DEF logError ctermfg = white ctermbg = red hi deb logWarn ctermfg = black ctermbg = yellow hi DEF logInfo ctermfg = green hi logDebug ctermfg = blue high def logAlways DEF ctermfg = yellow DEF Hi LogConfig ctermfg = cyan hi def logTime ctermfg = white ctermbg = blue hi de f logThreadName ctermfg = magenta hi deb logclassName ctermfg = cyan hi deb logLineNumber ctermfg = yellow hi link cConstant none
I try Is implemented : source ~ / .vimrc no use. My log files are always visible without Syntax highlighting. Files with file type that highlight highlighted (like .py or .c) works fine.
Do not use : au! Syntax ; Instead, move to for ; This will then be automatically read based on your file type identity: ~ / .vim / log.vim ~ / .vim / syntax / rclog.vim
au bufread, bufnew file rc.log * set file type = rclog you Can verify and troubleshoot with : scriptname , or via : 20bbbasebetrelatlecondition syntax = rclog .
Comments
Post a Comment