Giter VIP home page Giter VIP logo

sublime-cssfmt's Introduction

sublime-cssfmt

Sublime Text plugin for CSSfmt

Install

Package Control

Install CSSfmt with Package Control and restart Sublime.

You need to have Node.js installed.
Make sure it's in your $PATH by running node -v in your command-line.

Note: On OS X it's expected that Node resides in the /usr/local/bin/ folder, which it does when installed with the default installer. If this is not the case, symlink your Node binary to this location:
ln -s /full/path/to/your/node /usr/local/bin/node

Add Repository

  1. Open the Command Palette (Windows and Linux: ctrl+shift+p, OSX: cmd+shift+p)

  2. Select Package Control > Add Repository

  3. Paste in https://github.com/dmnsgn/sublime-cssfmt

Usage

Command Palette

Use the Command Pallete (Windows and Linux: ctrl+shift+p, OSX: cmd+shift+p) and run:

Run CSSfmt

Options

(Preferences > Package Settings > CSSfmt > Settings - User)

{
  "formatOnSave": true
}

Project settings

You can override the default and user settings for individual projects. Just add an "CSSfmt" object to the "settings" object in the project's .sublime-project file containing your project specific settings.

Example:

{
	"settings": {
		"CSSfmt": {
			"formatOnSave": false
		}
	}
}

Keyboard shortcut

You can also set up a keyboard shortcut to run the command by opening up Preferences > Key Bindings - User and adding your shortcut with the cssfmt command.

Example:

[
	{ "keys": ["alt+super+f"], "command": "cssfmt" }
]

License

Based on FixMyJS plugin by Addy Osmani.

ISC © Damien Seguin

sublime-cssfmt's People

Contributors

dmnsgn avatar zouxifeng avatar

Watchers

 avatar  avatar

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.