sponsor Vim development Vim logo Vim Book Ad

Better CSS Syntax for Vim : Make CSS more readable.

 script karma  Rating -13/60, Downloaded by 3365  Comments, bugs, improvements  Vim wiki

created by
Chris Yip
 
script type
syntax
 
description

Syntax highlights for full CSS2, most of HTML5 & CSS3 properties (include prefix like -moz-).

Preview:

Molokai sheme:

https://img.skitch.com/20120531-nt3x6qcgkjj7huarpfsh65cmph.jpg

Slate scheme:

https://img.skitch.com/20120531-ju922dsa9u68ib7cbwq27yaygj.jpg

Known issue:

- May not collaborate with some plugins, e.g. CSS Color, Sass
- Some properties can't highlighted well with prefix
- CSS3 animation properties highlighting

Because of this plugin is built for standard CSS and not compatible with original css.vim[1], if you run into any error that related to CSS, you may need this:

Sass:

How to get rid of the error:

- edit `sass.vim`, go to line 16, delete `cssValue.*,`
- edit your `.vimrc`, add `au BufRead,BufNewFile *.sass set filetype=css`

Or, try css3 syntax[2] or vim-css3-syntax[3].

----

[1] https://github.com/ChrisYip/Better-CSS-Syntax-for-Vim/issues/9#issuecomment-6034606
[2] http://www.vim.org/scripts/script.php?script_id=3042
[3] https://github.com/hail2u/vim-css3-syntax
 
install details
Copy css.vim to your ~/.vim/Syntax.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
css.vim.zip 2012/5/29 2012-05-28 7.0 Chris Yip Change log is here: https://github.com/ChrisYip/Better-CSS-Syntax-for-Vim/commits/master
css.vim.zip 20110302 2011-03-02 7.0 Chris Yip 1. Improved @import, @media, rotate(), rgba() highlights;
2. Bug fixing.
css.vim 20100827 2010-08-26 7.0 Chris Yip Initial upload
ip used for rating: 3.93.173.205

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github