othree / html5.vim

HTML5 omnicomplete and syntax
http://www.vim.org/scripts/script.php?script_id=3236
934 stars 76 forks source link

Errors when opening SCSS (SASS) files. #17

Closed rosstimson closed 12 years ago

rosstimson commented 12 years ago

I use this plugin alongside Tim Pope's HAML plugin (https://github.com/tpope/vim-haml) which also provides support for SASS & SCSS. Whenever I open SASS or SCSS files I get the following error:

"project/_base.scss" 17L, 582C
Error detected while processing /Users/rosstimson/code/dotfiles/.vim/bundle/haml/syntax/sass.vim:
line   16:
E409: Unknown group name: cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cs
sFunction,cssUnicodeEscape,cssRenderProp
E475: Invalid argument: cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssF
unction,cssUnicodeEscape,cssRenderProp
E400: No cluster specified
E475: Invalid argument: sassCssAttributes contains=css.*Attr,scssComment,cssValue.*,cssColor,cssURL,sassDefault,
cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp

I at first thought it was a problem with haml.vim plugin but it works fine when this plugin is removed so it looks like the two conflict with each other. I'm guessing haml.vim expects to see certain group names that are present in the standard css.vim and this plugin is somehow interfering / overriding them.

Any ideas or anyone using the two together successfully?

othree commented 12 years ago

I will take a look at this problem.

rosstimson commented 12 years ago

Great, thanks! I'll try and investigate myself soon but I'm a bit of a n00b when it comes to customising Vim at this sort of level.

I think this would be a great addition to the Janus project (https://github.com/carlhuda/janus) if this issue could be solved; can't see any reason why they wouldn't love to include this in core once it is fixed.

mhumeSF commented 12 years ago

I had this same problem when opening scss files and saw that sass.vim is referencing css.vim. The closest thing I was able to find in css.vim for cssValue was cssValFn, so I changed cssValue.* to cssValFn.* and haven't had any hiccups since. That is to say, I don't get an error message anymore, but I really don't know if this solved the issue.

dab commented 12 years ago

Same problem here. Getting same error when opening any *.sass files. Any suggestions? Thanks.

jamestomasino commented 12 years ago

I'm also having this issue. I'd love to know if anyone found a solution yet.

jamestomasino commented 12 years ago

Upon further searching, I found this exact problem happens with Better-CSS-Syntax-for-Vim and vim-haml as well. Until real fixes can be found, that plugin can be disabled by setting a global variable. Perhaps a similar flag could be added around the CSS portion of this plugin to keep the HTML5 styling, but skip the parts that collide in css3.

othree commented 12 years ago

After a small survey. This is not a bug in html5.vim.

The root cause is you use other css syntax plugin. And haml.vim requires the default css syntax file. Better-CSS-Syntax-for-Vim is the one replace the css syntax and didn't use any group name in the default one. So you should check your plugins related to css syntax.