Could there be an option added to allow the bracket matching to ignore brackets found in code that is commented out? The comments seem to be defined well enough in the .syn file, but when commenting out a few lines during testing, it becomes impossible to match actual brackets across the commented portions of code.
Perhaps this could be a configurable option that could be turned on/off as needed?
could bracket matching ignore commented code?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
need comment recognition fixed for this to work
Ignoring matching brackets within comments probably isn't doable until the .syn file can actually recognize all the comments rather than just those that begin in column 1. The Perl5.syn file is broken this way.
Perl5.syn is working now
Had a moment, so tried a regex in my .syn file.
Changing:
SingleComment = #
to:
SingleComment = .*#
now has comments being properly found in Perl, so we can again consider whether bracket matching should ignore extra brackets located within sections of commented out code.
Changing:
SingleComment = #
to:
SingleComment = .*#
now has comments being properly found in Perl, so we can again consider whether bracket matching should ignore extra brackets located within sections of commented out code.
it wasn't regex :(
I thought that adding the regex made the comments work, but it turns out that they work both with or without it as long as comments after the beginning of a line start with a <space> char. That seems good enough, even though the space isn't required by Perl, so may take a lot of reformating of old files. It *should* still allow brackets to be ignored within comments too.
I think this isn't important to try and do in TextPad.
When Brackets *do* appear in comments they are normally self contained which should mean that Match Brackets should jump past the comment stuff. If mismatched bracks do appear in the Comments (even though it doesn't affect code), you may as well match up the comment internal brackets anyway. What saiid that it was just code that should be pracket matched?
Blood Baz