If you simply set the tab settings (via the popup at the bottom of the window) to size 2, soft tabs, it will remember that for Haml (actually, I'm not certain it remembers the soft/hard setting, but it certainly will remember size).
Oh, and if you have indentation problems when pasting, you might want to turn off the Re-indent Pasted Text setting in TextMate prefs. If that's off, pasting will paste exactly what's in the clipboard. If that's on, TextMate will attempt to re-indent it, which theoretically allows you to paste between different indentation levels and have it work. Unfortunately, TextMate's indentation support isn't the best, so it can screw up. And in the case of Haml, the language grammar doesn't specify any indentation at all (given that it doesn't have any way of knowing if you want content in a tag), so I don't know if the Re- indent setting will actually do anything for Haml. On Feb 8, 12:11 pm, Evgeny <[EMAIL PROTECTED]> wrote: > I am not a TexTmate expert, but isn't there a way to force soft-tabs=2 for > the Haml language? > My guess is that its something that can be done in the language > specification ... > > - evgeny > > On 2/8/07, Chris Abad <[EMAIL PROTECTED]> wrote: > > > > > Even when using soft tabs, improper indentation will sneak its way in > > every now and then. This usually happens when I'm pasting code back and > > forth. Showing invisibles helps a lot to stay on top of this. > > > On Feb 8, 2007, at 3:31 AM, alistairholt wrote: > > > Hello all, > > > I've just been playing with this bit of HAML code which was producing > > errors so I decided to come along here and post it to see if anyone > > else could see anything wrong with it. > > > Turns out that when I was pasting the code from TextMate into this > > <textarea> the indentation was different! I had to go back to TextMate > > and remove all the indentation on the block and then re-indent it all > > again. This time when I pasted it back in here it was fine and the > > code worked without any errors in my Rails App. > > > Hope no one else falls into this! > > > Note: I was using TextMates 'soft tabs' set to 2 spaces for > > indentation. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
