Comment Fold Strings - not working

Syntax highlighting, code folding, brace matching, code indenting, and function list

Comment Fold Strings - not working

Postby darren_uk » Tue Apr 24, 2007 3:54 pm

I'm using 12.10b

I cannot seem to get Comment Fold Strings working. I've copied and pasted from the syntax.txt file and the help file, but still I cannot get the following to fold:

#Region
asdf

#End Region

A [-] appears next to the #Region but it refuses to fold.
I have the following in my wordfile.txt
/L20"UNIX Shell Scripts" Line Comment = # Escape Char = \ String Chars = "'` File Extensions = sh ksh csh SH KSH CSH
/Delimiters = ~%^+|\/{}:;"'` , .
/Function String = "%[a-zA-Z_]*)"
/Indent Strings = "{" "then" "else" "for" "do" "case" "function"
/Unindent Strings = "}" "else" "fi" "endif" "done" "esac" "exit" "return"
/Open Brace Strings = "{" "(" "[" "if" "do" "case"
/Close Brace Strings = "}" ")" "]" "fi" "done" "esac"
/Open Fold Strings = "else" "then" "do" "case" "elif"
/Close Fold Strings = "else" "fi" "done" "esac"
/Open Comment Fold Strings = "#Region"
/Close Comment Fold Strings = "#End Region"
User avatar
darren_uk
Newbie
 
Posts: 5
Joined: Mon Apr 23, 2007 11:00 pm

Re: Comment Fold Strings - not working

Postby Mofi » Wed Apr 25, 2007 6:57 am

Remove the # from both fold strings, specify # as delimiter character and it will work (tested with UE v13.00a).

By the way: File extensions are on Windows file systems not case sensitive. So sh ksh csh OR SH KSH CSH is enough. UE converts internally the extensions always to upper case.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4048
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Comment Fold Strings - not working

Postby darren_uk » Wed Apr 25, 2007 7:36 am

Thank you Mofi :)

So is it a bug in the documentation when it says the following will work:
/Open Comment Fold Strings = "#Region"
/Close Comment Fold Strings = "#End Region"
?
User avatar
darren_uk
Newbie
 
Posts: 5
Joined: Mon Apr 23, 2007 11:00 pm

Re: Comment Fold Strings - not working

Postby Mofi » Wed Apr 25, 2007 10:19 am

The documentation does not contain the delimiters and comment specifications for this example. So this example works perfect for example for C/C++ when "#Region" and "#End Region" are ANYWHERE inside a C/C++ line or block comment. # is for C/C++ normally not a delimiter.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4048
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Syntax Highlighting