[TxMt] Re: how to opt in to double-click-to-select-pair?
Allan Odgaard
mailinglist at textmate.org
Tue Aug 30 11:25:41 UTC 2016
On 29 Aug 2016, at 17:51, Matt Neuburg wrote:
> Well, and in fact what I was trying to select by double-clicking the
> "+" _is_ a scope.
>
> So maybe the double-clicking thing could be extended to mean, "if
> what's being double-clicked is a scope-boundary, select the scope"
This is sort of possible by making a “character class” setting for
the scope.
But this then affects everything that works on words, e.g. moving word
left/right, selecting word, etc., will also treat it as one unit, which
is often undesured.
Another possibility is to overload mouse clicks for this scope, right
now we only have the ability to overload single-click, you’d need to
create a new macro with:
scope selector: comment & dyn.modifier.option
semantic class: callback.mouse-click
content: ( { command = 'selectCurrentScope:'; } )
This macro will trigger whenever option-clicking inside a comment and
it’ll do a “select current scope”, hence this is a way to select
the entire comment.
You’d replace `comment` in the above with the scope of your `+foo+`
units.
I can probably add `callback.mouse-doubleclick` which would get rid of
the option modifier requirement.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20160830/29963c6b/attachment.html>
More information about the textmate
mailing list