[TxMt] Re: how to opt in to double-click-to-select-pair?
Allan Odgaard
mailinglist at textmate.org
Mon Aug 29 06:03:11 UTC 2016
On 26 Aug 2016, at 2:49, Graham Heath wrote:
> If what I’m reading is correct, this might be as simple as starting
> "from +
> 1" when looking up the next result.
>
> But I’m probably wrong, lol.
The problem is with things like: `+foo+ and +bar+`.
If you double-click the second `+` then how to know if we should search
left or right for the paired character?
We could look at surrounding whitespace, but then there is `(+foo+)`
with no whitespace around. So we could look at word characters, but then
`"` is also a paired character and we have things like: `printf("%s…",
arg);` where neither side of the first `"` has whitespace or
wordcharacters.
That said, I’ve made a note about this, I think we could do a
heuristic based on the above thinking that should get it right most of
the time, and it would actually be awesome to have ⇧⌘B work in
strings.
Though right now there is “Select Current Scope” which works to
select the current “unit”, this might also be helpful in determining
whether to search left/right of `+foo+`, assuming the grammar matches
this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20160829/3ed0a6d5/attachment.html>
More information about the textmate
mailing list