[SVN] Request for additional input types

Allan Odgaard throw-away-1 at macromates.com
Fri Feb 10 22:16:31 UTC 2006


On 10/2/2006, at 22:24, Brad Choate wrote:

>> hmm… I sent you a private reply not so long ago which amongst  
>> others said (the first one should allow for grabbing “current  
>> paragraph”):
> Well, you also asked me to post feature requests like this to a  
> more public list so others could see the ensuing discourse.  And  
> this current command I'm working on begs for it.

Ah okay -- I read it mainly as a repeat of the same requests :)

Btw: textmate at lists.macromates.com is the better list to use. This  
one here is more for discussion among the bundle developers related  
mostly to the contents of these.

>>     As for input choice, I would like to allow for a search
>>     back/forward regexp to denote what should be the input, I think
>>     this would be extremely flexible.
> True-- and I'm not scared of regex, but simple things like "Current  
> Line" are there and I assume would not be going away with a regex  
> selection option.  "Current Paragraph" would be an easy way to ask  
> for the current paragraph without having to fashion a regex pattern  
> that accomodates different line endings and such.

That's true. A problem is that “current paragraph” is not well  
defined. For example in (some) markup languages (mostly where the  
markup which start/end the paragraph should be ignored). The user may  
also perceive a paragraph differently depending on whether or not he  
use soft wrap.

This could likely be handled by a (scope dependent) preference, and  
the input option would use the appropriate definition -- there are a  
few built-in functions which need this as well (as I know not all  
users are happy with my current definition).

> [...]
> I'm suggesting that the TM_SCOPE_TEXT be set to whatever is in  
> scope according to the scope selector of the bundle command.

Okay, that is indeed more useful than “current scope”. Long-term I  
probably would favor the scope-based query system, but this could  
serve as a short-term solution, and would probably cover 90% of the  
use cases… ;)

> [...] assign that to TM_SCOPE_TEXT (or send it as stdin, I don't  
> care-- it may be a lot of content).

Yes, would have to be stdin, as environment variables require setting  
on each run, and many scope selectors target an entire document (so  
would affect speed of every shell run for large/huge documents, plus  
environment variables have a size limit).




More information about the textmate-dev mailing list