• Stars
    star
    143
  • Rank 255,583 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[not maintained] A Sublime Text plugin that beautifies Sass files.

SassBeautify

https://sublime.wbond.net/packages/SassBeautify

A Sublime Text plugin that beautifies Sass files. (Compatible with Sublime Text 2 & 3.)

ScreenShot

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:

  1. Ensure you have package control installed, see here: https://sublime.wbond.net/installation
  2. 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:

  1. Download the zip file file here: https://github.com/badsyntax/SassBeautify/archive/master.zip
  2. 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:

  1. Open the command palette (ctrl/cmd + shift + p)
  2. Enter 'SassBeautify'

Conversion usage

Run the conversion commands from the command palette:

  1. Open the command palette (ctrl/cmd + shift + p)
  2. Type 'SassBeautify'
  3. 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.

  1. Open the default settings from the preferences menu: Preferences >> Package Settings >> SassBeautify >> Settings - Default
  2. Copy the settings and paste them into your user settings file: Preferences >> Package Settings >> SassBeautify >> Settings - User
  3. 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:

  1. Open up terminal
  2. Run: echo $PATH
  3. Copy the entire PATH into the 'path' setting
  4. Run: echo $GEM_PATH
  5. 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

More Repositories

1

react-seed

[not maintained] Seed project for React apps using ES6 & webpack.
JavaScript
430
star
2

jquery-spellchecker

[not maintained] A lightweight jQuery plugin that can check the spelling of text within a form field or DOM tree.
JavaScript
259
star
3

grpc-js-typescript

Generate gRPC TypeScript definitions for use with gRPC (@grpc/grpc-js).
156
star
4

jquery-youtube-player

[not maintained] A chromeless or embedded youtube video player, with custom toolbar and playlist.
JavaScript
70
star
5

docker-box

A lightweight docker application platform for single servers.
Shell
66
star
6

handlebars-form-helpers

Handlerbars.js form helpers
JavaScript
55
star
7

kohana3-examples

Example files for Kohana v3
PHP
33
star
8

react-snap-example

Example project for react-snap
JavaScript
26
star
9

mailinabox-ui

Experimental Mail-in-a-Box User Interface built with React, Redux, TypeScript & Fluent UI
TypeScript
19
star
10

dokku-discourse

Dokku plugin to manage discourse on your dokku server
Shell
16
star
11

tinymce-custom-inlinepopups

TinyMCE jQuery UI inline popups
JavaScript
16
star
12

polymer-twitter

An example twitter stream built with polymer web components
CSS
11
star
13

vscode-spotless-gradle

A VS Code extension to lint & format your source files using Spotless & Gradle.
TypeScript
11
star
14

vscode-entity-framework

Manage Entity Framework migrations in VS Code.
TypeScript
8
star
15

kohana3-admin

An example Kohana3 Admin module
PHP
8
star
16

gruntfile

An example project showing a better way to organize your gruntfile.
JavaScript
8
star
17

kohana3-base

Example Kohana 3 base module
PHP
7
star
18

strapi-webhook-actions-proxy

Strapi webhook proxy to trigger a GitHub repository_dispatch event
TypeScript
7
star
19

github-action-aws-cloudformation

GitHub Action to create/update your CloudFormation stack
TypeScript
7
star
20

kohana-device

Kohana 3.3 mobile device detection
PHP
7
star
21

richardwillis.info

My personal website
TypeScript
6
star
22

atom-sassbeautify

Beautify your Sass files
JavaScript
6
star
23

openapi-dotnet-react-typescript-fetch-example

An example project showing how to use the OpenAPI typescript-fetch HTTP client with React
Mustache
5
star
24

jquery-spellchecker-demo

Demos for the jQuery Spellchecker plugin
JavaScript
5
star
25

mailinabox-api

HTTP client SDK's for the Mail-in-a-Box API.
Mustache
5
star
26

generator-react-seed

React seed Yeoman generator
JavaScript
5
star
27

richardwillis.info-strapi

JavaScript
4
star
28

express-project-boilerplate

An express/requirejs/grunt/bower project boilerplate
JavaScript
4
star
29

domwalker.js

Find and replace text across nodes by walking the dom (work in progress)
JavaScript
4
star
30

s3-etag

Generate an accurate S3 ETAG in Node.js for any file (including multipart)
TypeScript
4
star
31

github-action-aws-s3

GitHub Action to sync files to S3. Includes accurate ETAG comparisons and parallel uploads with configurable concurrency & multipart chunk sizes
TypeScript
3
star
32

mailinabox-api-ts

JavaScript/TypeScript client SDK for the Mail-in-a-Box API.
TypeScript
3
star
33

github-action-issue-comment

Comment on a GitHub Issue using a Handlebars template.
3
star
34

github-action-aws-cloudfront

GitHub Action to easily invalidate CloudFront paths
TypeScript
3
star
35

mailinabox-api-py

Python client SDK for the Mail-in-a-Box API.
Python
3
star
36

github-action-render-template

A GitHub Action to render a Handlebars template
TypeScript
3
star
37

kohana-examples

Kohana 3.3 examples
PHP
2
star
38

dokku-setup

Simple docs on how to setup and use dokku.
Dockerfile
2
star
39

2do

2do: organize your life
PHP
2
star
40

bash-scripts

A small collection of possibly useful bash scripts
Shell
2
star
41

itunes-utils

A bash script that helps you manage your itunes library through applescript
Shell
2
star
42

github-action-aws-static-stack

A GitHub Action to deploy your static website to the AWS Edge.
CSS
2
star
43

server-tools

A repo to store documentation and BASH scripts for setting up a new Hetzner dedicated server
Shell
2
star
44

compressr.cc

Easily compress your Javascript using Closure Compiler, YUI compressor or Uglify.
PHP
2
star
45

pyrocms-tumblrimport

A PryoCMS module to import a tumblr blog.
PHP
2
star
46

sass-wrapper

[deprecated/not maininted] A nodejs module that provides a friendly javascript API for interacting with sass
JavaScript
2
star
47

playwright-test-repo

An example repo showing issues when importing an ES Module in your @playwright/test test file, and a workaround.
TypeScript
2
star
48

mp3-arrange

Arrange your music collection
JavaScript
2
star
49

angular-twitter

An example twitter stream built using angularjs
JavaScript
2
star
50

lxd-web-panel

A WIP web panel for LXD
JavaScript
1
star
51

dotfiles

A repo to store my dotfiles.
Vim Script
1
star
52

react-twitter

An example twitter stream built with react, es6, browserify and other shiny tools
JavaScript
1
star
53

vscode-generator-eslint-prettier-example

vscode-generator-eslint-prettier-example
TypeScript
1
star
54

dokku-email

A simple dokku plugin to send email notifications on successful deployment.
Shell
1
star
55

badsyntax.github.com

My github area
PHP
1
star
56

badsyntax.co

My Node.js site
JavaScript
1
star
57

jquery-snakey

jQuery snaky - a nibbles clone
JavaScript
1
star
58

jquery-plugins

A small collection of jQuery plugins / widgets
JavaScript
1
star
59

assetmanager

A kohana 3 assetmanager module, used in my admin module.
PHP
1
star
60

hyperapp-starter-project

Hyperapp starter project
JavaScript
1
star
61

docker

A repo to store my base docker images
Dockerfile
1
star
62

kohana-installer

Command line installer for Kohana using Github sources
Shell
1
star
63

dokku-github-actions-demo

HTML
1
star
64

ExampleRNScreenIssue

TypeScript
1
star
65

richard-willis-vscode-extension-pack

VS Code Extension pack for Richard Willis
1
star
66

vscode-solution-explorer

This is a Visual Studio Code extension that provides a (.sln) Visual Studio Solution explorer panel..
TypeScript
1
star
67

react-es6-browserify

Boilerplate for react, ES6 and browserify
JavaScript
1
star