SassBeautify
[not maintained] A Sublime Text plugin that beautifies Sass files.
Details
Installs
- Total 131K
- Win 61K
- Mac 52K
- Linux 17K
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | 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 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 2 | 1 | 0 | 0 | 1 | 3 | 0 | 0 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 2 | 5 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 |
Mac | 0 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 |
Linux | 0 | 0 | 1 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 1 | 2 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 |
Readme
- Source
- raw.githubusercontent.com
SassBeautify
https://sublime.wbond.net/packages/SassBeautify
A Sublime Text plugin that beautifies Sass files. (Compatible with Sublime Text 2 & 3.)
Dependencies
This plugin uses sass-convert
, and so you need to have sass installed. Read the sass download page to view the installation options.
It's a good idea to always use the latest version of Sass.
Installation
Option 1 (recommended)
Install via package control:
- Ensure you have package control installed, see here: https://sublime.wbond.net/installation
- Install the package: open up the command palette (ctrl/cmd + shift + p), execute the following command: 'Package Control: Install Package', then enter 'SassBeautify'
Option 2
Manual download:
- Download the zip file file here: https://github.com/badsyntax/SassBeautify/archive/master.zip
- Unzip the archive, rename the 'SassBeautify-master' folder to 'SassBeautify' and move it into your Sublime Text 'Packages' directory.
Usage
Default usage
Run the plugin from the command palette:
- Open the command palette (ctrl/cmd + shift + p)
- Enter 'SassBeautify'
Conversion usage
Run the conversion commands from the command palette:
- Open the command palette (ctrl/cmd + shift + p)
- Type 'SassBeautify'
- Choose one of the following options:
- Convert from CSS to current type
- Convert from SCSS to current type
- Convert from SASS to current type
Settings
Once installed, you can customize how the beautification works by changing the package settings.
- Open the default settings from the preferences menu:
Preferences >> Package Settings >> SassBeautify >> Settings - Default
- Copy the settings and paste them into your user settings file:
Preferences >> Package Settings >> SassBeautify >> Settings - User
- Change the user settings.
Settings overview
The following settings can be adjusted:
{
// How many spaces to use for each level of indentation. "t" means use hard tabs.
"indent": 4,
// Convert underscores to dashes.
"dasherize": false,
// Output the old-style ":prop val" property syntax. Only meaningful when generating Sass.
"old": false,
// Custom environment PATH.
"path": false,
// Custom environment GEM_PATH.
"gemPath": false,
// Beautify the sass file after saving it?
"beautifyOnSave": false,
// Keep "inline" comments inline?
"inlineComments": false,
// Add a new line between selectors?
"newlineBetweenSelectors": false,
// Use single quotes everywhere
"useSingleQuotes": false
}
Key bindings
The plugin does not set any default key bindings, thus you will need to specify your own.
In your keymap file (Preferences >> Key bindings - User), add a custom key binding:
[
{
"keys": ["alt+w"],
"command": "sass_beautify"
}
]
Issues with ruby, Sass and your PATH
If you installed ruby and sass via a version manager tool like RVM, rbenv or via an installer like ruby installer, then you're likely to encounter issues with running sass-convert
from Sublime Text.
Compatibility with RVM/rbenv
You need to specify the custom PATH
and GEM_PATH
values in your SassBeautify user settings.
Follow the steps below:
- Open up terminal
- Run:
echo $PATH
- Copy the entire
PATH
into the 'path' setting - Run:
echo $GEM_PATH
- Copy the entire
GEM_PATH
into the 'gemPath' setting
Compatibility with RubyInstaller
During the install process, there should be an option to add ruby to your environment PATH. Ensure this option is selected.
Issues
This plugin should work on Linux (tested on Ubuntu 12.04), Windows (tested on Windows 7/8) and OSX (tested on 10.5.7).
Please create an issue if you find it doesn't work as expected on your setup.
Thanks
Thanks to the contributors and to all the people who have tested and reported issues.
License
Licensed under the MIT license. Created by Richard Willis