mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-08 13:44:46 +08:00
Highlight css unit correctly
This commit is contained in:
@@ -181,7 +181,8 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
" Style
|
" Style
|
||||||
" Redefine syn-region to color <style> correctly.
|
" Redefine (less|sass)Definition to highlight <style> correctly and
|
||||||
|
" enable emmet-vim css type.
|
||||||
if s:use_less
|
if s:use_less
|
||||||
syntax clear lessDefinition
|
syntax clear lessDefinition
|
||||||
syntax region cssLessDefinition matchgroup=cssBraces contains=@LessSyntax
|
syntax region cssLessDefinition matchgroup=cssBraces contains=@LessSyntax
|
||||||
@@ -195,6 +196,12 @@ if s:use_sass
|
|||||||
\ start="{" end="}"
|
\ start="{" end="}"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Highlight css unit correctly
|
||||||
|
syntax clear cssUnitDecorators
|
||||||
|
syntax match cssUnitDecorator
|
||||||
|
\ /\(#\|-\|+\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)\ze\(;\|$\)/
|
||||||
|
\ containedin=cssAttrRegion,sassCssAttribute,lessCssAttribute
|
||||||
|
|
||||||
" Coffee
|
" Coffee
|
||||||
if s:use_coffee
|
if s:use_coffee
|
||||||
silent! syntax clear coffeeConstant
|
silent! syntax clear coffeeConstant
|
||||||
|
|||||||
Reference in New Issue
Block a user