2011-05-02 3 views
1

나는 그것은 구분하지 않는 HTML에 대한 강조 정력의 구문처럼 보인다빔 구문 파일을 HTML 구문에 대한 엄격한 할 수

<link rel="stylesheet" type="text/css" href="stylesheet.css" media="all"> 

보다

<link rel=stylesheet" type="text/css" href="stylesheet.css" media="all"> 

오히려이었다 버그로 그냥있어 비트 둘. 어딘가에서 얻을 수있는 더 엄격한 구문 파일이 있습니까?

(그리고 싫어하는 위해 : vim questions belong on stackoverflow, not superuser) 정지 방편으로

답변

0

, 나는 ~/.vim/syntax/html.vim$VIMRUNTIME/syntax/html.vim의 사본을 넣어 그것을 수정 : (이 그냥이 특정 오류를 잡는다 일치하지 않는

38c38 
< syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc 
--- 
> syn match htmlValue contained /=[\t ]*\%('\%(\\.\|[^\\']\)*'\|"\%(\\.\|[^\\"]\)*\|[^'" \t>]*\)/hs=s+1 contains=htmlString,javaScriptExpression,@htmlPreproc 
40c40 
< syn region htmlTag    start=+<[^/]+ end=+>+ contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster 
--- 
> syn region htmlTag    start=+<[^/]+ end=+>+ contains=htmlTagN,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster 
43a44 
> syn match htmlTagError contained /['"].*/ 
168c169 
< syn region htmlScriptTag  contained start=+<script+ end=+>+  contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent 
--- 
> syn region htmlScriptTag  contained start=+<script+ end=+>+  contains=htmlTagN,htmlArg,htmlValue,htmlTagError,htmlEvent 

을 따옴표), 그래서 나는 여전히 엄격한 html을위한 더 나은 구문 파일에 매우 관심이있다.