Author Topic: Code Folding in ASP (VBScript) doesn't work  (Read 7085 times)

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Code Folding in ASP (VBScript) doesn't work
« on: December 03, 2010, 01:42:56 am »
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!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Code Folding in ASP (VBScript) doesn't work
« Reply #1 on: December 03, 2010, 06:47:14 am »
IHMO this was a bug in the scintilla version we are currently using. I've a patch pending though... stay tuned.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code Folding in ASP (VBScript) doesn't work
« Reply #2 on: April 13, 2011, 08:33:45 pm »
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 '  '}

EDIT: On reloading, the above trick doesn't work! :'(
« Last Edit: April 13, 2011, 08:51:00 pm by rickg22 »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Code Folding in ASP (VBScript) doesn't work
« Reply #3 on: April 14, 2011, 06:32:49 am »
...did you try with SciTE?

I've no idea about how well scintilla supports vbscript. :-(
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code Folding in ASP (VBScript) doesn't work
« Reply #4 on: April 14, 2011, 06:51:10 am »
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
%>
« Last Edit: April 14, 2011, 06:59:11 am by rickg22 »

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Code Folding in ASP (VBScript) doesn't work
« Reply #5 on: April 14, 2011, 05:40:42 pm »
I tried in C::B at work.

If I change to VBScript, the folding doesn't change automatically. I need to configure in the editor settings to use VBScript for ASP files, and then the folding will appear.

But then another problem comes: ALL the file is squiggly-underlined in green. I can't understand why, as nothing in the editor settings is underlined :(