Giter Club home page Giter Club logo

vim-csscomb's Introduction

DEPRECATED

This version of CSScomb is no longer supported, guys.
We have a new super cool Node.js version instead!

Tool for sorting CSS properties

  • Sorts CSS properties into a logical, consistent order
  • Allows for custom sorting of CSS properties (set it to whatever order you're accustomed to)
  • Parses CSS in style tags and style attributes -- can comb other languages for CSS as well
  • Does not change existing formatting of style sheets --target single or multiple lines of CSS
  • Separates CSS properties into groups (you can have groups of empty strings, if you want)
  • Fully supports CSS2/CSS2.1/CSS3

The CSScomb algorithm simulates a web developer's judgment in ordering CSS styles. You can spend tons of time re-ordering code--moving lines over each other, working around comments in the code, moving multi-line sets of property values, and all sorts of hacking to make your code more readable. CSScomb takes care of these tasks for you. It "thinks" like a person editing the text, not as a blind robot parsing CSS.

CSScomb.com

The Requirements

CSScomb is written in pure PHP, without any external libraries or dependencies. See details at wiki.

  • Sublime Text 2 plugin avaliable in Package Control as 'CSScomb'
  • TextMate plugin
  • Coda plugin
  • Coda 2 plugin
  • Espresso 2 plugin (How to install)
  • IntelliJIDEA plugin
  • WebStorm plugin
  • PyCharm plugin
  • Notepad ++ plugin
  • Chocolat Mixin
  • Vim Plugin

CLI usage

Available at csscomb.com

% php csscomb.php

CSSComb
Command line tool for resort CSS code.

SYNOPSIS
    $ php csscomb.php -s <file with JSON array> -i <path to input css file> -o <path to result css file>

DESCRIPTION
    options:
    -s, --sort-order    specify file with custom sort order. File must contain JSON data. For detail information run 'csscomb.php --help-sort-order'
    -i, --input         must be directory name or file that needs to be sorted
    -o, --output        sort result file. Use output when input is not a directory name, otherwise output param ignored. If output filename does not exist, the file is created. Otherwise, the existing file is overwritten.

    --help, -help, -h, -? or no options will print this man.

EXAMPLE
    csscomb.php -s my-custom-sort-order.json -i css/style.css -o css/style-resorted.css

EXAMPLE 2
    csscomb.php -i some_directory_name

Twitter

@csscomb

vim-csscomb's People

Contributors

batsuev avatar faceleg avatar inside avatar miripiruni avatar sdball avatar tonyganch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-csscomb's Issues

Support csscomb.js

We have a node version of csscomb ready.
It will be nice if this plugin is updated by the time of public release.

If someone starts working on this task, please leave a comment.
Keep in mind that current (php) version should stay available for download.
The easiest way is to make a release before making any changes.
Thank you.

Error running :CSScomb

When I run :CSScomb on a buffer with a plain old .css file I get the following error:

Error detected while processing function g:CSScomb:
line    7:
E684: list index out of range: 1
E15: Invalid expression: split(systemOutput, "\n")[1]
Press ENTER or type command to continue

Added semicolon to the end of handlebars variables in CSS

In one of my projects I have a construction like that:

background: "{{background}}";

As you see, there is a handlebars variable. When I exes :CSScomb I get following result:

background: "{{background;}}";

Is it possible to fix this behavior?

csscomb.json not being recognized

The CSScomb default effects are working but not custom config in VIm. It works in Atom though so I know the config is good but it may not be in the right place for this plugin. The csscomb.json file is a few directories outside of the sass folder but the entire project is open. Do configs work with this plugin and if so where do you reccomend to put it? Thanks so much for the plugin in Vim.

:CSScomb does NOT change/update .css file

Hey guys, csscomb is globally installed on my npm and the csscomb vim plugin is runing fine, the problem is no matter what I do, the :CSScomb command does not comb my .css files, it just runs silent and I can't see any changes no matter how mess up is the .css file.

I appreciate any help with that.

Thanks!
-- Henry

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.