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

Toggle Css Format

by speilberg0 ST2/ST3

Plugin for fast css-style changing in Sublime Text 2

Details

  • 2012.08.16.12.21.04
  • github.​com
  • github.​com
  • 7 years ago
  • 2 hours ago
  • 7 years ago

Installs

  • Total 12K
  • Win 8K
  • OS X 3K
  • Linux 998
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 Oct 6 Oct 5 Oct 4 Oct 3
Windows 0 1 1 2 1 0 1 2 1 1 0 1 2 3 0 0 2 1 1 4 1 1 2 2 0 1 1 1 1 2 2 4 1 0 1 1 1 2 3 0 0 1 1 0 0 1
OS X 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 1 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 1 0 0 0 0
Linux 0 1 0 1 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 1 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Singleline package for Sublime Text 2

SingleLine is a CSS Single to Multiline Style Switch plugin for Sublime Text 2.

It will convert between multi-line rules:

body {
    height: 600px;
    width: 600px;
    margin: auto;
    border: 1px solid #000;
}

to

body { height: 600px; width: 600px; margin: auto; border: 1px solid #000; }

It also works in less / scss with nested selectors:

.upperclass{
   .middleclass{
        .testclass{
            margin: 20px;
            padding: 10px;
            background: #f00;
        }
    }
}

to

.upperclass{
   .middleclass{
        .testclass{ margin: 20px; padding: 10px; background: #f00; }
    }
}

Keyboard Shortcuts

To toggle between single-line and multiline format you can either select the block or move the cursor inside the block and press ctrl+alt+j.

You can also expand selection to css rule with ctrl+shift+r.

Installing

Without Git: Download the latest source zip from github and extract the files to your Sublime Text “Packages” directory, into a new directory named SublimeToggleCssFormat.

With Git: Clone the repository in your Sublime Text “Packages” directory:

git clone git://github.com/speilberg0/SublimeToggleCssFormat.git

The “Packages” directory is located at:

  • OS X: ~/Library/Application Support/Sublime Text 2/Packages/
  • Linux: ~/.Sublime Text 2/Packages/
  • Windows: %APPDATA%/Sublime Text 2/Packages/

That's it!