[TxMt] Re: Tab character always inserts
Allan Odgaard
mailinglist at textmate.org
Sat Oct 3 11:01:48 UTC 2015
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.
More information about the textmate
mailing list