User forums > Using Code::Blocks

Code Folding in ASP (VBScript) doesn't work

(1/2) > >>

rickg22:
Hi guys. I don't know if this is a bug or I'm missing some plugin...

I have an .asp file that I'm editing. It has a <% tag at the beginning and a  %> tag at the end.

There is a folding indicator for those tags, but inside, I can see no folds between a begin and and end. I even tried the custom //{ and //} folding, but that doesn't work either.

Checking on the syntax highlighting I saw that the file is marked as "HTML/ASP/JS/PHP". If I change it to "VBSCRIPT" I get no folding between the <% and %> tags, but all the code becomes squiggly underlined.

Am I missing something?

Thanks!

MortenMacFly:
IHMO this was a bug in the scintilla version we are currently using. I've a patch pending though... stay tuned.

rickg22:
I downloaded revision 7075 which according to the post, has a streamlined wxscintilla... but the folding still doesn't work :( Do I have to assume that scintilla just doesn't fold well with ASP?

EDIT: I managed a workaround. Since Codeblocks assumes the " ' " character is a string delimiter (and not a comment delimiter as VBSCRIPT specifies), I only create a "fake string" commenting a bracket:


--- Code: ---function myfunction(blah) '  ' {

end function '  '}

--- End code ---

EDIT: On reloading, the above trick doesn't work! :'(

MortenMacFly:
...did you try with SciTE?

I've no idea about how well scintilla supports vbscript. :-(

rickg22:
I tried with SciTE, and if I select "VBScript", I can fold properly.

EDIT: This is interesting. In an older version of C::B (5686), I can select "vbscript" as the highlighting mode, and the blocks show Ok. But in the newest version, the change had no effect.  I'll try tomorrow at work (where I have the latest C::B) to confirm.

Here's the sample "test.asp":


--- Code: ---<%
class myclass

function myfunc(a,b,c)
blah
blah

end function


end class
%>

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version