mirror of
https://github.com/hail2u/vim-css3-syntax.git
synced 2025-12-10 04:21:50 +08:00
Wrap texts on 80th column
This commit is contained in:
29
README.md
29
README.md
@@ -7,12 +7,14 @@ Add CSS3 syntax support to [Vim][1]'s built-in `syntax/css.vim`.
|
|||||||
INSTALLATION
|
INSTALLATION
|
||||||
------------
|
------------
|
||||||
|
|
||||||
I **strongly** recommend to install this plugin on *Vim 7.4 or higher with default runtime files*.
|
I **strongly** recommend to install this plugin on *Vim 7.4 or higher with
|
||||||
|
default runtime files*.
|
||||||
|
|
||||||
|
|
||||||
### Manual Installation
|
### Manual Installation
|
||||||
|
|
||||||
Download from GitHub, extract `vim-css3-syntax.tar.gz`, and copy the contents to your `~/.vim` directory.
|
Download from GitHub, extract `vim-css3-syntax.tar.gz`, and copy the contents to
|
||||||
|
your `~/.vim` directory.
|
||||||
|
|
||||||
|
|
||||||
### Installing with Git and pathogen
|
### Installing with Git and pathogen
|
||||||
@@ -26,7 +28,9 @@ NOTES
|
|||||||
|
|
||||||
### Highlighting problems on: `vertical-align`, `box-shadow`, and others
|
### Highlighting problems on: `vertical-align`, `box-shadow`, and others
|
||||||
|
|
||||||
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 `~/.vim/after/css.vim`:
|
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 `~/.vim/after/css.vim`:
|
||||||
|
|
||||||
setlocal iskeyword+=-
|
setlocal iskeyword+=-
|
||||||
|
|
||||||
@@ -43,28 +47,37 @@ This setting have side effects, so use it at your own risk.
|
|||||||
|
|
||||||
### Vendor Prefixes
|
### Vendor Prefixes
|
||||||
|
|
||||||
I do not plan to support CSS3 properties (or functions) with vendor prefixes, such as `-webkit-` or `-moz-`, etc. These are hard to maintain because they are:
|
I do not plan to support CSS3 properties (or functions) with vendor prefixes,
|
||||||
|
such as `-webkit-` or `-moz-`, etc. These are hard to maintain because they are:
|
||||||
|
|
||||||
* Added frequently
|
* Added frequently
|
||||||
* Changed unexpectedly
|
* Changed unexpectedly
|
||||||
* Removed silently
|
* 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, `:highlight` and `:match` would help:
|
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, `:highlight` and `:match` would help:
|
||||||
|
|
||||||
:highlight VendorPrefix guifg=#00ffff gui=bold
|
:highlight VendorPrefix guifg=#00ffff gui=bold
|
||||||
:match VendorPrefix /-\(moz\|webkit\|o\|ms\)-[a-zA-Z-]\+/
|
:match VendorPrefix /-\(moz\|webkit\|o\|ms\)-[a-zA-Z-]\+/
|
||||||
|
|
||||||
These commands highlight vendor prefixed properties and functions instantly with cyan and bold (on gVim).
|
These commands highlight vendor prefixed properties and functions instantly with
|
||||||
|
cyan and bold (on gVim).
|
||||||
|
|
||||||
|
|
||||||
### CSS Preprocessors: [Sass][2], [LESS][3], and [Stylus][4]
|
### CSS Preprocessors: [Sass][2], [LESS][3], and [Stylus][4]
|
||||||
|
|
||||||
`vim-css3-syntax` supports Sass's SCSS syntax only. If you want use this plugin with LESS, install [VIM-LESS][5]. Sass's indent synatx and Stylus are not supported.
|
`vim-css3-syntax` supports Sass's SCSS syntax only. If you want to use this
|
||||||
|
plugin with LESS, install [VIM-LESS][5]. Sass's indent synatx and Stylus are not
|
||||||
|
supported.
|
||||||
|
|
||||||
|
|
||||||
### Media Queries
|
### Media Queries
|
||||||
|
|
||||||
I drop Media Queries Level 3 support in v0.12.0. There is no easy way to supprt Media Queries properly with `after` syntax plugin like this one, sorry. If you want to highlight Media Queries correctly, you must update Vim to 7.4+ or install [JulesWang/css.vim][6].
|
I drop Media Queries Level 3 support in v0.12.0. There is no easy way to supprt
|
||||||
|
Media Queries properly with `after` syntax plugin like this one, sorry. If you
|
||||||
|
want to highlight Media Queries correctly, you must update Vim to 7.4+ or
|
||||||
|
install [JulesWang/css.vim][6].
|
||||||
|
|
||||||
|
|
||||||
AUTHOR
|
AUTHOR
|
||||||
|
|||||||
Reference in New Issue
Block a user