CSS to snippets snippets

From Bluefish Wiki
Revision as of 12:54, 22 March 2010 by Fal7i (talk | contribs) (Created page with '<pre> <?xml version="1.0"?> <snippets> <branch title="css2snippets"> <leaf type="snr" title="rm brackets" tooltip="Remove all poperties declarations." region="b" matchtype="per…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


<?xml version="1.0"?>
<snippets>
<branch title="css2snippets">
<leaf type="snr" title="rm brackets" tooltip="Remove all poperties declarations." region="b" matchtype="perl" casesens="0" escapechars="1">
<searchpat>{[^}]*}</searchpat>
<replacepat>\n</replacepat>
</leaf>
<leaf type="snr" title="rm comments" tooltip="Remove all CSS comments." region="b" matchtype="perl" casesens="0" escapechars="0">
<searchpat>/\*[^*]*\*/</searchpat>
<replacepat> </replacepat>
</leaf>
<leaf type="snr" title="split ," tooltip="split ," region="b" matchtype="posix" casesens="0" escapechars="1">
<searchpat>,[ ]*</searchpat>
<replacepat>\n</replacepat>
</leaf>
<leaf type="snr" title="split ." tooltip="split ." region="b" matchtype="normal" casesens="0" escapechars="1">
<searchpat>.</searchpat>
<replacepat>\n.</replacepat>
</leaf>
<leaf type="snr" title="rm :" tooltip="Remove Anchor Pseudo-classes" region="b" matchtype="perl" casesens="0" escapechars="0">
<searchpat>:\w+</searchpat>
<replacepat> </replacepat>
</leaf>
<leaf type="snr" title="split spaces" tooltip="split spaces" region="b" matchtype="normal" casesens="0" escapechars="1">
<searchpat> </searchpat>
<replacepat>\n</replacepat>
</leaf>
<leaf type="snr" title="INFO: sort/uniq now!" tooltip="This snippet make nothing!
It is here only to remember to run now:
Tools>Filters>Sort/Uniq and after that
remove uneeded lines." region="b" matchtype="normal" casesens="0" escapechars="0">
<searchpat> </searchpat>
<replacepat> </replacepat>
</leaf>
<leaf type="snr" title="div" tooltip="Create div tags with id attribute
 from all #selectors" region="b" matchtype="perl" casesens="0" escapechars="0">
<searchpat>#([-_a-zA-Z0-9]*)</searchpat>
<replacepat><leaf type="insert" title="\1"><before>&lt;div id="\1"&gt;
</before><after>
&lt;/div&gt;</after></leaf></replacepat>
</leaf>
<leaf type="snr" title="span" tooltip="Create span tags with class attribute from 
all class selectors." region="b" matchtype="perl" casesens="0" escapechars="0">
<searchpat>\.([-_a-zA-Z0-9]*)</searchpat>
<replacepat><leaf type="insert" title="\1"><before>&lt;span class="\1"&gt;</before><after>&lt;/class&gt;</after></leaf></replacepat>
</leaf>
<leaf type="insert" title="Header" tooltip="Header to add at the top of the file">
<before><?xml version="1.0"?>
<snippets>
<branch title="%0"></before>
<after/>
<param name="branch title"/>
</leaf>
<leaf type="insert" title="Footer" tooltip="Footer to add at the end of the file.">
<before></branch>
</snippets></before>
<after/>
</leaf>
</branch>
</snippets>