[TxMt] Re: Non-contiguous selection
Allan Odgaard
mailinglist at textmate.org
Tue Jun 24 22:24:01 UTC 2008
On 24 Jun 2008, at 15:26, Patrick James wrote:
> [...]
> So, the moral of my story is that in a text editor with GREP Find/
> Replace having non-contiguous text selection brings a massive amount
> of additional text editing power.
My last comments on this: http://lists.macromates.com/textmate/2007-August/021949.html
As for your smart-quotes example, have a look at http://daringfireball.net/projects/smartypants/
-- this will also skip text inside <pre> etc. It is included with
TextMate, so you can e.g. use ⌥⌘R and type ‘SmartyPants.pl’. We
don’t have a dedicated command for it, but the Markdown conversion
commands (in the Markdown bundle) uses it.
I know your quotes thing was just an example, but I think in most
examples where discontinous selection can be used, there is often an
existing solution which does the job fine. As mentioned in the linked-
too letter, the discountinous selection will introduce _a lot_ of
complexity for all commands that work with a selection, and I don’t
feel that is worth it (and in TextMate, as opposed to e.g. Nisus
Writer, commands for the most part are user-extensions, and the simple
contract we presently have for these is IMHO a major contributing
factor to the amount of useful bundle commands we have today).
Also, I have another feature coming in 2.0 which will allow you to
effectively do the further replacements on the results of a ‘find
all’ (so even w/o SmartyPants.pl, there will be a simple way to do
the same).
I do however feel TM needs a way to highlight discontinuous text
segments, and technically this can be made using dynamic scopes, which
in practice can be used by a command to “parse out” the selection…
More information about the textmate
mailing list