Editing in CodeMix
The CodeMix Editor has a number of features that improve the coding experience, including formatting and code folding. You can set preferences for these features, along with IntelliSense and Navigation, for a workflow that best meets your needs.
The CodeMix plugin is compatible with Eclipse-based IDEs and tools—like MyEclipse, Spring Tools Suite, and JBoss Tools—so you can continue working in the environment you are accustomed to.
Setting Editor Preferences
You can customize your experience in CodeMix editors by setting preferences. Most of these preferences are accessed from Window>Preferences>CodeMix>Editors.
Note: Some settings use Eclipse preferences. To select Displayed tab width and Insert space for tabs settings, go to General>Editors>Text Editors. To select auto save settings, go to General>Editors>Autosave.
A formatter allows you to quickly format code to keep it consistent and easy to read. CodeMix includes built-in formatting for a number of file types, with the option to to install formatting extensions for greater control of formatting settings. Refer to Formatting in CodeMix for more information.
Code folding allows you to collapse and expand sections of code in the editor, making it easier to work with large files and focus on relevant code.
Setting the Code Folding Preference
Code folding is enabled by default. To change this preference, go to Preferences>CodeMix> Editors>Folding.
Using Code Folding
A minus icon to the left of the code indicates the start of a section that can be collapsed. Click the icon to hide the block of code. The first line in the block of code remains visible with a plus icon. Click the plus icon to expand the block of code.
Tip: Hover the plus icon to preview collapsed code.
You can also use the following shortcuts with the numeric keypad:
- Collapse All—
- Expand All—
- Collapse current—
Ctrl+-(Ctrl key plus the minus key)
- Expand Current—
Ctrl++(Ctrl key plus the plus key)