This article is part of a ‘mini series’ about hidden gems, tips and tricks around Eclipse.
The topic of this one is how to ‘fold’ text in the editor.
With ‘folding’ I can hide/un-hide portions of source in the editor. To use folding, have it enabled in the Window > Preferences:
Little ‘+’ and ‘-‘ in the editor view show up to fold and unfold. The above setting allow to configure what shall be folded/unfolded. Unlike in Visual Studio (C# with the #region … #endregion syntax) it is not possible to fold an arbitrary section. As a workaround I do have ‘Enable folding of preprocessor branches’ enabled. That way I can do the same thing:
Move the mouse over a ‘+’ shows a preview what is behind:
The following shortcuts are very useful to deal with folding:
- Fold everything: <CTRL>+<SHIFT>+<NUM-KEYPAD-DIVIDE>
- Un-fold everything: <CTRL>+<SHIFT>+<NUM-KEYPAD-MULTIPLY>
Happy folding 🙂
Links
- Eclipse Gems, Tips & Tricks: Importing Projects
- Eclipse Gems, Tips & Tricks: Close and Open Projects
- Eclipse Gems, Tips & Tricks: Text Block Selection
- Eclipse Gems, Tips & Tricks: Project Filter
- Eclipse Gems, Tips & Tricks: Black Theme
- Eclipse Gems, Tips & Tricks: Faster Debugger Start
- Eclipse Gems, Tips & Tricks: RT(F)M
- Eclipse Gems, Tips &Tricks: Show in System Explorer
- Eclipse Gems, Tips & Tricks: Open Declaration
- Eclipse Gems, Tips & Tricks: Code Completion
- Eclipse Gems, Tips & Tricks: Highlight Usage and Definition
- Eclipse Gems, Tips & Tricks: Block Comments
- Eclipse Gems, Tips & Tricks: Working Sets
Pingback: Tweaking MCUXpresso IDE Black Theme | MCU on Eclipse