better-css-syntax-for-vim


Ⅰ. 插件描述

Better CSS Syntax for Vim

Ⅱ. 基本信息

创建日期:  2010-08-26
使用用户:  64
Github星:  56
插件作者:  Chris Yip

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'chrisyip/better-css-syntax-for-vim-fearless'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'chrisyip/better-css-syntax-for-vim-fearless'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'chrisyip/better-css-syntax-for-vim-fearless'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/chrisyip/better-css-syntax-for-vim

Ⅳ. 文档说明

# Better CSS Syntax for Vim

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

Preview:

Molokai sheme:

Molokai

Slate scheme:

Slate

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 (see this), 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 or vim-css3-syntax.

添加新评论