Closed kristijanhusak closed 10 years ago
Yes, this is an issue with some regex in scss.vim.
Can it be fixed somehow?
I found a fix for this, but i'm not sure if it will break something else because i'm not so good in writing syntax highlighting scripts. here https://github.com/cakebaker/scss-syntax.vim/blob/master/syntax/scss.vim#L38 if i remove \s*
from the beginning of the line, we get this
syn match scssSelector "^\zs\([^:@]\|:[^ ]\)\+{\@=" contained contains=@scssSelectors
I know that \s*
matches spaces, but i think that the matching of spaces is already done in \zs
part. As i said, not 100% if this is ok, but if it is, i'll create PR.
Yes, please create a PR. Your solution is cleaner than what I came up with:
syn match scssSelector "\s*\zs\([^:@]\|:[^ ]\)\+\ze{\@=" contained contains=@scssSelectors
Both regexes produce the same syntax highlighting of example.scss, without breaking anything there.
Thanks for reporting and your PR.
No problem ;)
Today i installed this plugin https://github.com/Yggdroot/indentLine because i wanted some indent guidelines. The plugin works fine with all filetypes except the scss. I posted an issue on that plugin repo here https://github.com/Yggdroot/indentLine/issues/75, but i didn't notice any problems in other filetypes, so i guess it's issue in the scss syntax highlighting, not in a plugin itself. Can this be fixed easily somehow?