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

Stylefmt

by dmnsgn ALL

Sublime Text plugin for Stylefmt

Labels style, css, formatting

Details

Installs

  • Total 4K
  • Win 2K
  • Mac 2K
  • Linux 472
Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6
Windows 1 2 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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