Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using vim with CleverCSS and was wondering if anyone has made a CleverCSS vim syntax file, or if I should make my own. Thank you!


share|improve this question
up vote 1 down vote accepted

I just tried a quick search an came up with nothing. My guess is the time spent trying to find one is longer than just writing one. I've never used CleverCSS, but it looks very simple. I would write my own. Let me know if you need help getting started, but syntax files in vi are pretty easily defined.

share|improve this answer
i'd wonder if there's a basic CSS syntax file to start from (under my assumption that CleverCSS is essentially a CSS subset). although CleverCSS seems semi-python-esque, so maybe a python syntax file is more appropriate. – quack quixote Oct 26 '09 at 17:28
Knowing nothing about CleverCSS, I took some of the examples from the website & about all the tags, classes, ids, rbg color id's and some attibutes had correct syntax highlight with the css.vim that came with vim 7.2. I think the attributes need work. Also you'd need to add variable support - in background_color = #ccc - only the color spec gets syntax highlight. And nothing is done with background-color: $background_color. If you took anything from the python.vim, it would be the function python_highlight_space_errors – DaveParillo Oct 26 '09 at 20:25
I take back my comment! Playing around with it a bit, I think it would be easier to make a modified version of the python.vim to handle the varying syntax rather than the other way around. The css.vim is pretty tough to modify. Even though all of the css keywords & attributes need to be handled (match where possible, keyword where must) I think the python file is a short and understandable starting point. – DaveParillo Oct 26 '09 at 22:08

I wrote a syntax highlight definition file for CleanCSS (really similar syntax) for the Kate text editor

I don't know about vi syntax files but maybe you can get inspiration from it.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .