ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Stylefmt

by dmnsgn ST2/ST3

Sublime Text plugin for Stylefmt

Labels style, css, formatting

Details

Installs

  • Total 3K
  • Win 1K
  • OS X 1K
  • Linux 307
Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8
Windows 1 0 0 3 1 2 2 1 0 2 1 0 0 0 0 1 1 0 0 1 0 1 1 2 0 3 1 1 2 1 1 1 1 3 3 0 0 2 0 1 2 1 1 2 0 2
OS X 1 2 1 0 1 2 2 0 2 1 3 2 0 0 2 0 0 0 1 6 3 0 0 1 0 0 3 2 2 0 2 2 1 0 2 2 0 1 1 2 0 1 0 0 1 2
Linux 1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 1 0 1 0 0

Readme

Source
raw.​githubusercontent.​com

sublime-stylefmt

Sublime Text plugin for Stylefmt

Install

Package Control

Install Stylefmt 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-stylefmt

Usage

Command Palette

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

Run Stylefmt

Options

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

The format on save functionality can be extended to be applied on specific syntaxes or extensions.

{
  "formatOnSave": false,
  "syntaxes": ["SCSS"],
  "extensions": [".scss"]
}

Project settings

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

Example:

{
    "settings": {
        "Stylefmt": {
            "formatOnSave": false,
            "syntaxes": ["SCSS"],
            "extensions": [".scss"]
        }
    }
}

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 stylefmt command.

Example:

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

License

Based on FixMyJS plugin by Addy Osmani.

ISC © Damien Seguin