[TxMt] Re: ^T in version 2.0-alpha.9475

Allan Odgaard mailinglist at textmate.org
Wed Aug 28 11:07:41 UTC 2013


On 28 Aug 2013, at 10:34, David Hislop wrote:

> Selecting the following text strings and pressing Ctrl+T -> the 
> resulting string, which seems incorrect […]

Control-T has always been “reverse the selection” when multiple 
characters on a single line was selected, which is what your output 
shows, so correct behavior.

I recently made it detect a few cases of “two items separated by 
something” and made it swap those two items, but the ways in which you 
can have two items separated by something is infinite, so there are many 
cases not catched by the current pattern.

You can always do two (discontinuous) selections and press ⌃T to swap, 
or you can submit a pull request to improve the pattern matching, the 
relevant code is here: 
https://github.com/textmate/textmate/blob/master/Frameworks/editor/src/transform.cc#L74 
with corresponding tests here 
https://github.com/textmate/textmate/blob/master/Frameworks/editor/tests/t_transform.cc


More information about the textmate mailing list