[TxMt] Re: Tab character always inserts

Carpii UK carpii.uk at gmail.com
Sun Oct 4 10:06:48 UTC 2015


This works a treat. Thanks Allan!

On 3 October 2015 at 12:01, Allan Odgaard <mailinglist at textmate.org> wrote:

> On 3 Oct 2015, at 1:38, Carpii UK wrote:
>
> Is there a way in TM2 to have the Tab character always replace the current
>> selection (similar to most other text input)?
>>
>
> Create a snippet with a tab character and set its key equivalent to the
> tab key, then you get one tab character inserted (except when enabling soft
> tabs, here TextMate converts tabs in snippets to the proper amount of
> spaces).
>
> If you only want this override to be active for replacements then set the
> scope selector to `dyn.selection`.
>
> You can also scope it to `L:dyn.caret.begin` so that it only works when at
> the beginning of a line. The `L:` prefix here is because we want to match
> the scope to the left of the caret.
>
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20151004/97da1633/attachment.html>


More information about the textmate mailing list