Add CSS3 syntax support to Vim's built-in
I strongly recommend to install this plugin on Vim 7.4 or higher with default runtime files.
Download from GitHub, extract
vim-css3-syntax.tar.gz, and copy the contents to your
$ cd ~/.vim/bundle $ git clone https://github.com/hail2u/vim-css3-syntax.git
Some properties do not highlight correctly by default. This is a limitation of Vim's highlight priority mechanism. To fix this problems, put following lines in your
Or in your
augroup VimCSS3Syntax autocmd! autocmd FileType css setlocal iskeyword+=- augroup END
This setting have side effects, so use it at your own risk.
I do not plan to support CSS3 properties (or functions) with vendor prefixes, such as
-moz-, etc. These are hard to maintain because they are:
- Added frequently
- Changed unexpectedly
- Removed silently
These must be supported by separate syntax plugins (Vim 7.4's default CSS syntax file supports this). If you want to highlight prefixed properties or functions manually,
:match would help:
:highlight VendorPrefix guifg=#00ffff gui=bold :match VendorPrefix /-\(moz\|webkit\|o\|ms\)-[a-zA-Z-]\+/
These commands highlight vendor prefixed properties and functions instantly with cyan and bold (on gVim).
vim-css3-syntax supports Sass's SCSS syntax only. If you want use this plugin with LESS, install VIM-LESS. Sass's indent synatx and Stylus are not supported.
Kyo Namegashima firstname.lastname@example.org