Home » Products » UEStudio » UES Tour » Code folding

UEStudio integrated development environment tour: code folding

The UEStudio tour is intended to guide you through some of the advanced IDE features of the application. UEStudio includes all of the features of UltraEdit, the world's best text editor, which are not covered here.

UEStudio tour: code folding

With an intentional design focus on being language neutral, UEStudio does not favor any one specific programming language. Because versatility is its strength, users will find it easy to configure the application to support almost any programming language. In fact UEStudio boasts syntax highlighting and code-folding support for C/C++, Java Script, VB Script, PHP, ASP, Perl, and HTML programming languages...plus many more!

Code folding in UEStudio works in conjunction with the hide/show Lines feature users of UltraEdit will already know.

There are two configuration options under Advanced -> Configuration -> Editor Display -> Code Folding that determine whether or not code folding and hiding/showing lines is supported in UEStudio: enable show/hide lines and code folding and enable show/hide lines for non syntax highlighted files.

Enable show/hide lines and code folding

If this option is selected, then the hide/show lines command may be invoked via the view menu option. Selection of this configuration option also enables code folding and a small gutter will be visible between the line numbers and the edit window where the symbols used for code folding ("+" and "-") will be displayed. By default code folding will operate on any strings (whether characters - "{, }" - or words - "if, endif") defined in the active wordfile as /Open Fold Strings or /Close Fold Strings. Please see syntax highlighting in the help files for further information on fold strings.

If a "+" or "-" is displayed in the folding gutter the folding state of the referenced code may be toggled by left-clicking on the folding symbol in the folding gutter. For example, in the following code:

Screenshot of code folding in UEStudio

...clicking on the "+" would expand the collapsed code. Clicking on the "-" would collapse the expanded code.

There are two code folding options that may be selected from the view menu: expand all and collapse all.

Expand all
When this command is invoked from the view menu, all blocks in the active file bounded by indent/unindent strings defined in the active wordfile would be expanded. If text is selected this will affect only the selected region. If no text is selected this command will operate on the whole of the active file.

Please note: When this command is invoked, strings hidden using the Hide Lines command will be expanded as well as folded sections of code.

Collapse all
When this command is invoked from the View menu, all blocks in the active file bounded by the Indent/Unindent Strings defined in the active wordfile would be collapsed. If text is selected this will affect only the selected region. If no text is selected this command will operate on the whole of the active file.

Enable show/hide lines for non syntax highlighted files
If this option is selected in the advanced configuration, then the Hide/Show Lines command may be invoked via the View menu option even on files that have no syntax highlighting (e.g. on standard text files). The advantage here is that lines that have been hidden using the Hide/Show Lines command will be indicated by the "+" in the folding gutter. If this option is not selected, text may not be hidden in non-highlighted files and the folding gutter will not be displayed.


UEStudio tour topics

Back to top


Buy Now
Upgrade
Download

Get your solution today!

UEStudio/UltraCompare Solution

Add UltraCompare to your purchase/upgrade of UEStudio and complete your file management solution.

Existing UltraEdit users
UltraEdit to UEStudio

Upgrade from UltraEdit

to UEStudio and...

...receive a $30 credit!