Hello vimmers!

I did spot that "setlocal iskeyword+=-" breaks syntax highlight for css (and
derived sass). I am using this iskeyword modification to improve behaviour of 
word completion and word selection for these file types.

Attached a patch to css.vim that fixes this for font-*, small-* and
background-* attributes, by adjusting position of end word elements.

-- 
Michal Kurgan

-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff -u -r vim72.orig/runtime/syntax/css.vim vim72/runtime/syntax/css.vim
--- vim72.orig/runtime/syntax/css.vim	2007-11-06 12:58:22.000000000 -0700
+++ vim72/runtime/syntax/css.vim	2010-07-28 00:18:50.000000000 -0600
@@ -87,9 +87,9 @@
 syn keyword cssCommonAttr contained top bottom
 syn keyword cssCommonAttr contained medium normal
 
-syn match cssFontProp contained "\<font\>\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\>\)\="
+syn match cssFontProp contained "\<font\(-\(family\|style\|variant\|weight\|size\(-adjust\)\=\|stretch\)\)\=\>"
 syn match cssFontAttr contained "\<\(sans-\)\=\<serif\>"
-syn match cssFontAttr contained "\<small\>\(-\(caps\|caption\)\>\)\="
+syn match cssFontAttr contained "\<small\(-\(caps\|caption\)\)\=\>"
 syn match cssFontAttr contained "\<x\{1,2\}-\(large\|small\)\>"
 syn match cssFontAttr contained "\<message-box\>"
 syn match cssFontAttr contained "\<status-bar\>"
@@ -102,7 +102,7 @@
 syn keyword cssFontAttr contained narrower wider
 
 syn keyword cssColorProp contained color
-syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\="
+syn match cssColorProp contained "\<background\(-\(color\|image\|attachment\|position\)\)\=\>"
 syn keyword cssColorAttr contained center scroll fixed
 syn match cssColorAttr contained "\<repeat\(-[xy]\)\=\>"
 syn match cssColorAttr contained "\<no-repeat\>"

Raspunde prin e-mail lui