shading inactive code

shading inactive code

1
NewbieNewbie
1

    Jul 14, 2006#1

    Lookig for a solution as to shade or hide inactive source code. Take following example, where 'DEBUG' would need to be a variable global to the project:

    Code: Select all

    .if (DEBUG)
       SomeDebugCode;
    .else
       DoSomethingClever;
    .endif
    Say DEBUG=0, then source code string 'SomeDebugCode' would be shaded or even hidden.
    Can such be achieved in UltraEdit ?

    6,683583
    Grand MasterGrand Master
    6,683583

      Jul 14, 2006#2

      Not with the intelligent method you want. UltraEdit does not understand the bytes you see. It is a general text editor and not an editor for a specific file format (programming language).

      You can use the alternate block comment definitions in the wordfile for your language to shade a block of text from word DEBUG to ... (well first problem, else or endif).

      You can also specify in your wordfile open and close fold strings for the code folding feature.

      An individual wordfile can be specified for every project. So the wordfile solutions can be customized for every project.

      You can also select a not active code block and use View - Hide/Show Lines - Hide/Show Selection. This hide is saved in uedit32.ini for the current file and restored when the file is opened next time, if you have enabled Editor- Bookmarks - Save bookmarks.

      Finally you can write a macro which hides all inactive block on every file open with the method above - see Any way to 'prefold' code folds? and Customized Code Folding for HTML.
      Best regards from an UC/UE/UES for Windows user from Austria