css3 mod


Ⅰ. 插件描述

Enhanced version of CSS syntax highlighting script file for vim,supports for CSS3

Ⅱ. 基本信息

创建日期:  2012-05-31
使用用户:  9
Github星:  1
插件作者:  fremff ff

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'fremff/css3-mod'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'fremff/css3-mod'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'fremff/css3-mod'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Enhanced version of CSS syntax highlighting script file for vim, supports for CSS3 #

Introduction

The script is based on the original css syntax file,
and support for CSS3 syntax highlighting.
Included many of CSS3 Property,Attribute and Selector,
and support for the prefix _"-moz-,-webkit-,-o-,-ms-"_,too.
About At-rule groups that in the script file, see the link.
Also, it support the Beautify CSS feature, you can use it to by the :CSSBeautify command.

Options

As a optional, "css_fast_sync" argument can be used for switch the syntax synchronization settings.
By default, to use syn sync minlines=2000 as the setting of syntax synchronization.
If you have a slow machine,then you can use the following option(to use syn sync maxlines=200):

let g:css_fast_sync = 1

About the CSSBeautify command :

Original:

body{ width:680px ;
background-color:#FFF;
box-shadow: -1px 1px 3px #DDD;
padding: 10px
}
a:nth-of-type(2n) 
{
  background-color:#FFF!important
}
.class #id{border-radius:0px!important;}

Applied the command:

body {
width: 680px ;
background-color: #FFF ;
box-shadow: -1px 1px 3px #DDD ;
padding: 10px ;
}
a:nth-of-type(2n) {
background-color: #FFF !important;
}
.class #id {
border-radius: 0px !important;
}

Screenshots:

Example 1
Example 2
Example 3

添加新评论