Tapatalk

Multi-level Code Folding, Fold on Open

Multi-level Code Folding, Fold on Open

2
NewbieNewbie
2

    Nov 16, 2006#1

    Is there any way to enable multi-level code folding? For example, an IF/END IF block will easily fold. But, if you have another IF/END IF block within that one, the fold logic sees the first END IF and uses it to fold the code. If need be, how about a fold based on column? Or nested sets?

    Next, will you please consider an enhancement which will allow files to open with all the code folded? It seems that others may wish to have an option to open files with all the code unfolded. Maybe you could add these options to the Code Fold configuration?

    Thanks in advance!

    Alf

    6,685587
    Grand MasterGrand Master
    6,685587

      Nov 17, 2006#2

      Multi-level code folding is built-in and should work independent of column. It works for me in 'C' and ASM files. Example:

      Code: Select all

      @IF( @DEFINED (@DEFINE1) )
       ; ASM code
       ; ASM code
      @ELSE
       ; ASM code
       ; ASM code
      
      @IF( ! @DEFINED (@DEFINE2) )
       ; ASM code
      @ENDI
      
      @IF( @DEFINED (@DEFINE3) )
       ; ASM code
      @ELSE
       ; ASM code
      @ENDI
      
       ; ASM code
      @ENDI      ; End of ELSE branch of DEFINE1
      Clicking on the MINUS at line of first @ELSE folds everything till last @ENDI.

      Which version of UltraEdit or UEStudio do you use? Can you post an example where multi-level code folding fails and all the lines of the appropriate syntax highlighting definition in the wordfile from /Lx"..." till /C1"..."?


      Second you can enable to save code folding on file close, so the file is opened next time with the same folding state as on last usage (enabled with config option Save Bookmarks for UE < v12.20 or Save folded lines for UE >= v12.20).

      If the file was never opened before you can use View - Hide/Show Lines - Collapse All with a self-defined hot key or you use a macro which is executed on every file load which folds the file based on file extension with the help of macro command HideOrShowLines.

      I have posted several macros with this command for a "customized collapse all on file load". Use forum search with the macro command name as search string and the select the search option Search for all terms which is important for this (and most other) search(es).
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Nov 17, 2006#3

        Hi, Mofi. Many thanks for the reply. After posting, I realized I should have made the feature request through their email, so I sent it there as well. This really is one of the best editors I've seen. Thanks again! - Alf