[TxMt] Newbee Q: Hard tabs vs. soft tabs
Charilaos Skiadas
skiadas at hanover.edu
Wed Jan 31 17:10:20 UTC 2007
On Jan 31, 2007, at 10:15 AM, Charilaos Skiadas wrote:
>
> Actually what would probably work is setting tab as a "tab
> trigger". Then the command will only be triggered if it is preceded
> by a tab (and will swallow that tab).
>
Ok, here are some more details on it. I've actually attached the two
commands that would do this, so you can use those as they are, or you
can reproduce them as follows. Set the tab setting to soft tabs: 4.
Create a new command, with tab trigger set to four spaces, and with
command text:
echo -n " "
So that's echo -n followed by a tab in quotes. Set the input to none,
and the output to Insert As Text.
Create a second command, with tab trigger a tab character (you would
need to copy and paste the character in there to get it there), input
none and output insert as text, and with command text:
echo -n " "
So in the quotes there are now a tab followed by four spaces.
This should give you the desired behavior without compromising the
tab triggers. Just make sure you set the above two commands to use a
tab trigger, not a key equivalent.
> Haris
>
Haris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabtwice.tmCommand
Type: application/octet-stream
Size: 688 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20070131/295737e3/attachment.tmCommand>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabonce.tmCommand
Type: application/octet-stream
Size: 686 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20070131/295737e3/attachment-0001.tmCommand>
-------------- next part --------------
More information about the textmate
mailing list