Skip to content

Instantly share code, notes, and snippets.

@reedlauber
reedlauber / compact_expand_css_command.py
Created October 8, 2012 16:12 — forked from vitaLee/compact_expand_css_command.py
SublimeText command for compacting/expanding CSS rules
import sublime
import sublime_plugin
import re
class CompactExpandCssCommand(sublime_plugin.TextCommand):
def run(self, edit, action='compact'):
rule_starts = self.view.find_all('\{')
rule_ends = self.view.find_all('\}')