mirror of
https://github.com/leafOfTree/vim-vue-plugin.git
synced 2025-12-08 05:34:44 +08:00
Highlight css unit correctly
This commit is contained in:
@@ -181,7 +181,8 @@ else
|
||||
endif
|
||||
|
||||
" 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
|
||||
syntax clear lessDefinition
|
||||
syntax region cssLessDefinition matchgroup=cssBraces contains=@LessSyntax
|
||||
@@ -195,6 +196,12 @@ if s:use_sass
|
||||
\ start="{" end="}"
|
||||
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
|
||||
if s:use_coffee
|
||||
silent! syntax clear coffeeConstant
|
||||
|
||||
Reference in New Issue
Block a user