Hi
now this should start a new thread.
I'm wondering if there's a) a bug in 'select paragraph' , or b) plans for a version of it that will select the 'code block' you're working on
the reason being that (in ruby at least) the selection made bears little relation to the structure of the code AFAICT. In perl it seems just to select the current line.
I don't know if this is a bundle- or lower-level thing, but perhaps the best way for it to work would be for each press of alt-P (or whatever) to move the selection to the next outmost code folding boundary
eg one press selects the loop you're in, another the method, and another the entire class.
am i missing something really obvious to Allan as usual, or is this feature missing?
I know Allan's working on the entire syntax engine so I'll make no mention of parentheses bouncing or matching :)
D
ah. I have a feeling the answer is F1 , opt-shift-L.
never mind.
On 02/04/2005, at 10:46 AM, David Lee wrote:
Hi
now this should start a new thread.
I'm wondering if there's a) a bug in 'select paragraph' , or b) plans for a version of it that will select the 'code block' you're working on
the reason being that (in ruby at least) the selection made bears little relation to the structure of the code AFAICT. In perl it seems just to select the current line.
I don't know if this is a bundle- or lower-level thing, but perhaps the best way for it to work would be for each press of alt-P (or whatever) to move the selection to the next outmost code folding boundary
eg one press selects the loop you're in, another the method, and another the entire class.
am i missing something really obvious to Allan as usual, or is this feature missing?
I know Allan's working on the entire syntax engine so I'll make no mention of parentheses bouncing or matching :)
D
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
On Apr 2, 2005, at 2:46, David Lee wrote:
now this should start a new thread.
Thanks! :)
a) a bug in 'select paragraph' , or b) plans for a version of it that will select the 'code block' you're working on
Select paragraph is indeed for prose. If you by 'code block' just want stuff inside e.g. {...} then yes, I'll add such a function. For more advanced stuff, like e.g. what would be a code block in ruby (class/def/do ... end) this will need some more thoughts about how to make it general.
The new syntax system might be helpful here, but I'm not entirely sure.
thanks
What I used is workable for many tasks, but is no good if you want to select beyond the immediate containing block (eg, if you want to select a function while you're in a loop). I think this kind of text selection merits planning in, if only because there will ultimately be so many applications for filters & unix tool integration with TextMate.
To be useful to me it needs to be language-independent. Would using the code folding definitions of what constitutes a block achieve generality? That way there'd be no reinventing the wheel, and selection will mature with the bundles.
The paragraph selection tool could be useful for coding AND prose with only slight modification. If it consistently treated a single line containing nothing OR only whitespace as a break (at the moment a lone tab is enough to make the line 'part of a paragraph'), that would help a lot and to my mind lose nothing.
Going beyond that, if, when triggered repeatedly it would 1st select the containing 'code block' (ie, as above but ignoring all blank lines) 2nd+ select progressively outer 'code blocks', that would be it sewn up (methinks).
Now if you wanted to get really carried away, you could have, say, ctrl-alt-opt-(up or down) move blocks of selected text in semantically sensible ways (eg with a function selected, move up one function definition at a time) which would be nifty for refactoring code.
my opinions only
D
On 04/04/2005, at 7:13 AM, Allan Odgaard wrote:
On Apr 2, 2005, at 2:46, David Lee wrote:
now this should start a new thread.
Thanks! :)
a) a bug in 'select paragraph' , or b) plans for a version of it that will select the 'code block' you're working on
Select paragraph is indeed for prose. If you by 'code block' just want stuff inside e.g. {...} then yes, I'll add such a function. For more advanced stuff, like e.g. what would be a code block in ruby (class/def/do ... end) this will need some more thoughts about how to make it general.
The new syntax system might be helpful here, but I'm not entirely sure.
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate