In the Haml Sass Bundle, add a new command I called mine Selection to Sass
The settings are as follows: Save: Nothing Command: #!/bin/sh echo "$TM_SELECTED_TEXT" | css2sass --stdin Input: Selected Text or Nothing Output: Replace Selected Text If you want a hotkey for it go to Settings set the scope selector to source.sass and choose your Keys. Michael On Jun 1, 2009, at 5:48 PM, Jacques Crocker wrote: > > Michael, you can create a textmate a command that converted the > currently selected css text to sass? That'd be awesome! :-) > > On Jun 1, 3:44 pm, Nathan Weizenbaum <[email protected]> wrote: >> If you omit the output filename, css2sass will print to stdout. >> >> >> >> On Mon, Jun 1, 2009 at 3:33 PM, Michael Moen >> <[email protected]> wrote: >> >>> Nathan- >> >>> On second thought it would be great if css2sass had a --stdout >>> option. >> >>> Then I could wrap it in a TextMate marco and convert it in place. >> >>> Just a thought. >> >>> Michael >> >>> On Jun 1, 2009, at 4:59 PM, Nathan Weizenbaum wrote: >> >>>> I'm wary about adding configuration options for little things like >>>> this, although I admit being able to copy straight from Firebug is >>>> useful. Anyone else have opinions? >> >>>> On Mon, Jun 1, 2009 at 2:57 PM, Jacques Crocker >>>> <[email protected]> >>>> wrote: >> >>>> Really seems like it should be some kind of in opt-in >>>> configuration to >>>> allow semicolons >> >>>> Sass::Plugin.options[:allow_semicolons] = true >> >>>> Semi-colons don't seem like terribly bad style to me. They seem >>>> ok to >>>> leave in if it causes wasted effort while copy/pasting styles from >>>> firebug. >> >>>> On Jun 1, 2:49 pm, Jeremy Dunck <[email protected]> wrote: >>>>> I've hit it many times, too, but after the first time, I very >>>> quickly >>>>> recognized the problem. +1 to keep from me, despite me porting a >>>> ton >>>>> of CSS to SASS. >> >>>>> On Mon, Jun 1, 2009 at 4:39 PM, Nathan Weizenbaum >>>> <[email protected]> wrote: >>>>>> The point of the rule is to make enforce nice-lookingness on >>>> your Sass >>>>>> files. This is of course a stylistic choice, but enforcing good >>>> style is >>>>>> pretty core to Sass. >> >>>>>> On Mon, Jun 1, 2009 at 1:45 PM, weepy <[email protected]> wrote: >> >>>>>>> You're probably going to shoot me down for this, but I think >>>>>>> SASS >>>>>>> should just ignore semi colons at the end of a line. >> >>>>>>> The number of times it's whacked me whilst converting some CSS >>>>>>> by >>>>>>> hand... :) >> >>>>>>> On 1 June, 11:33, "[email protected]" >>>> <[email protected]> >>>>>>> wrote: >>>>>>>> Thanks a lot! It's working now... >> >>>>>>>> On 1 Jun., 10:58, Nathan Weizenbaum <[email protected]> wrote: >> >>>>>>>>> Error message made more descriptive in revision 8a84675. >> >>>>>>>>> On Mon, Jun 1, 2009 at 1:48 AM, Nathan Weizenbaum >>>> <[email protected]> >>>>>>>>> wrote: >>>>>>>>>> Nilesh pointed out the real solution to this on another >>>> thread: >>>>>>>>>> you've got >>>>>>>>>> semicolons in there. I should really make that error >>>> message more >>>>>>>>>> descriptive. >> >>>>>>>>>> On Mon, Jun 1, 2009 at 12:57 AM, Nathan Weizenbaum >>>>>>>>>> <[email protected]>wrote: >> >>>>>>>>>>> That feature seems to be in that version for me. Is it >>>> possible you >>>>>>>>>>> have >>>>>>>>>>> an old Haml version vendored in that project? Does it >>>> work if you >>>>>>>>>>> use sass >>>>>>>>>>> on the command line? >> >>>>>>>>>>> On Mon, Jun 1, 2009 at 12:36 AM, [email protected] < >>>>>>>>>>> [email protected]> wrote: >> >>>>>>>>>>>> According to sass -version i'm on Haml 2.1.0.e1817a0 >>>> this seems to >>>>>>>>>>>> bee >>>>>>>>>>>> the latest master?! I use compass in combination with >>>> rails. >> >>>>>>>>>>>> Should i update to edge? And if so, how do i do that? >> >>>>>>>>>>>> On 1 Jun., 09:20, Nathan Weizenbaum <[email protected]> >>>> wrote: >>>>>>>>>>>>> This is allowed in the latest Sass master branch - >>>> I'd suggest >>>>>>>>>>>> updating. >> >>>>>>>>>>>>> On Sun, May 31, 2009 at 11:35 PM, >>>> [email protected] < >> >>>>>>>>>>>>> [email protected]> wrote: >> >>>>>>>>>>>>>> Hi! >> >>>>>>>>>>>>>> I'm trying to do this in a mixing: >> >>>>>>>>>>>>>> = rounded_corners(!radius = 20px) >>>>>>>>>>>>>> :-webkit-border-radius= !radius; >>>>>>>>>>>>>> :-moz-border-radius= !radius; >> >>>>>>>>>>>>>> It gives me an Sass::SyntaxError stating that >>>>>>>>>>>>>> -webkit-border-radius >>>>>>>>>>>>>> isnt valid css. >> >>>>>>>>>>>>>> While technicaly true, this isn't helping very >>>> much... >> >>>>>>>>>>>>>> How do i fix this? >> >>>>>>>>>>>>>> Thanks! > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/haml?hl=en -~----------~----~----~----~------~----~------~--~---
