Hi, I was hoping someone could point out what I'm doing wrong.
I've customized my ActionScript lanugage definition to be "Javadoc aware." I'm having trouble setting up the foldings regex (being an ActionScripter, I don't regularly use regex, so maybe that's part of the problem. Can't wait for AS3, though...).
Here's what I have:
foldingStartMarker = '(/*|{\s*$|[\s*$|(\s*$)'; foldingStopMarker = '(*/|^\s*]|^\s*}|^\s*))';
// and later... { name = 'comment.javadoc.actionscript'; begin = '/**'; end = '*/'; },
And here's what happens. I ype "/**". At this point the language definition knows that I'm in comment.javadoc. I get a downward-pointing arrow for the top of the code fold area. I've also get snippets set up to expand /** into
/** * */
and return the caret to the middle line. There is a single space at the front of the bottom two lines. (I also have it set up to replace a return press with a return and an asterisk, but that's beside the point) Now, I don't get the upward-pointing arrow for the bottom of the code fold area. I just discovered that the space seems to be throwing it off. If I go back to the closing of the javadoc comment, and remove that initial space, I get code folding.
So I tried modifying the foldingStopMarker, but with no success. Is there an easy way to do this? Am I being a moron and doing this completely the wrong way? I've tried a number of regex's:
foldingStopMarker = '(^\s**/|^\s*]|^\s*}|^\s*))'; foldingStopMarker = '(\s**/|^\s*]|^\s*}|^\s*))'; foldingStopMarker = '( */|^\s*]|^\s*}|^\s*))'; foldingStopMarker = '(^[ \t]**/|^\s*]|^\s*}|^\s*))';
And many variations thereof, but with no luck. I may be just misunderstanding how the foldingStopMarker works in the first place, but if anyone can point me in the right direction I'd be very appreciative. I like my asterisk's to line up, and I like my code folding.
Thanks, Dru
On 16/6/2006, at 19:14, Dru Kepple wrote:
[...] Here's what I have:
foldingStartMarker = '(/\*|\{\s*$|\[\s*$|\(\s*$)'; foldingStopMarker = '(\*/|^\s*\]|^\s*\}|^\s*\))';
[...] /**
*/
The folding start and stop line needs the same indent to be detected. Above the stop line has one leading space which makes the indent different from the start line.
For this to work, you would need to use something like:
/** * * **/
So, the same indent needs to occur? I assume that a space counts as part of the indent, then. There's no way to say "I want space-asterix-slash to be the closing fold marker, and treat anything before that first space as the indent?"
Thanks, Dru
On 6/19/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 16/6/2006, at 19:14, Dru Kepple wrote:
[...] Here's what I have:
foldingStartMarker = '(/\*|\{\s*$|\[\s*$|\(\s*$)'; foldingStopMarker = '(\*/|^\s*\]|^\s*\}|^\s*\))';
[...] /**
*/
The folding start and stop line needs the same indent to be detected. Above the stop line has one leading space which makes the indent different from the start line.
For this to work, you would need to use something like:
/** * * **/
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
grumble grumble grumble.
Thanks for the help. I guess I can use a "." or "`" or something...in the meantime, it goes on my wish list!
Dru
On 6/20/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 20/6/2006, at 20:46, Dru Kepple wrote:
So, the same indent needs to occur? I assume that a space counts as part of the indent, then [...]
Yes -- there is no workaround presently, sorry.
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