[TxMt] Newbee Q: Hard tabs vs. soft tabs
Rob McBroom
textmate at skurfer.com
Wed Jan 31 14:51:36 UTC 2007
On Jan 31, 2007, at 12:50 AM, Garance A Drosehn wrote:
> What I want is my tab-intent to be a soft-tab (using blanks) at 4
> spaces, but I also want hard-tabs (using the actual tab character) to
> be used for 8 spaces. So, if I tab once I want four spaces, if I tab
> twice then I want a single tab character, and with three tabs I want a
> tab-character followed by four spaces.
>
Someone will correct me if I'm wrong, but I don't think you can have
TextMate do this for you just by altering settings.
You could probably create a command that goes through your document
and replaces 8 spaces with a tab character. To get even fancier, you
could probably create a command that does this and saves the document
and bind this command to ⌘S, so when you save the file, it gets
formatted the way you want.
I'm not sure if TextMate will let you use Tab as a key equivalent for
a command, but if so, you could make it even more automated (probably
what you want) by having it do a search/replace on the current line
every time you hit the Tab key. This might screw up the cursor
position though.
---
Rob McBroom
<http://www.skurfer.com/>
I didn't "switch" to Apple... my OS did.
---
Rob McBroom
<http://www.skurfer.com/>
I didn't "switch" to Apple... my OS did.
More information about the textmate
mailing list