Skip to content

Instantly share code, notes, and snippets.

@Aking-nice
Aking-nice / compact_expand_css_command.py
Created April 5, 2017 02:53 — 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('\}')