Code Folding and the Navigator

Whether you are coding HTML or PHP, your code will have large chunks of content that can be logically grouped together. In HTML, these are your various tags. In PHP and other programming languages they are your functions, classes, and conditional blocks.

For most languages, when Espresso parses your file for syntax coloring, it also breaks it into logical chunks. You can then use these chunks to hide code you are not actively working on (code folding) or quickly navigate your document using the Navigator.

Code folding

Code folding allows you to hide sections of your code that you are not actively editing to make it easier to focus on the portions that need your attention.

To see what portions of your code can be folded, hover your mouse over the line number gutter. When you do so, the code folding ribbon will show up with blue and gray shading that shows what sections of the code can be folded. Simply click an arrow or highlighted segment in the ribbon to fold that code:

Click a closed arrow or the ...button to unfold the code:

The portions of your code that can be folded will vary from language to language; some third party language sugars may not support code folding at all.

The Navigator

The Navigator (located in the Tools sidebar) shows a hierarchical representation of your document. You can click items to immediately jump to them in the source code, or drag and drop items to move them.

Because code folding and the Navigator use the same logic to understand a document's hierarchy, if the language you are using does not support one the other will not be available.