[TxMt] Input Environment Variables

Wolfgang Machert wmachert at googlemail.com
Sun Feb 4 14:20:20 UTC 2007


On 04.02.2007, at 14:36, Charilaos Skiadas wrote:

>> Is it possible to have some additional TM_INPUT_END_(LINE|INDEX)  
>> variables to definitely catch the end-point data no matter what  
>> kind of selection (downward/upward) has been used?
>
> I suppose having TM_SELECTED_TEXT would allow you to determine the  
> end of the selection. Not ideal, but possible probably.

Although you are right at this point (and the effort doing so is  
indeed pretty zero - using stdin for larger selections seems like the  
proper approach) it doesn't seem... appropriate... to me to  
recalculate some data that is already there - at least in TextMate.
Though if I'm the only one having the need for this it might be  
simpler just calculating the endpoint.


>> It would also be convenient having both the start-/end-point line  
>> content (not only the current) as an environment setting which  
>> saves reading the whole document for one of two lines again.
>
> I would suggest filing these as feature requests with the ticket  
> system: http://macromates.com/ticket/
> Make sure to provide practical use-cases that show the need for these.

My intention is to check the first character left of the selection  
and the first character right of the selection on alphanumeric-ness.
AsciiDoc, for which I'm writing a bundle at the moment,  
differentiates between normal and inline formating (i.e. normal  
*bold*, or inline **bold**nes) - and I'd like to handle the  
difference automagically by one single command.

greetings
Wolfgang



More information about the textmate mailing list