7.2 Editor Options

To set editor options:

  1. Select Tools > Options (MPLAB X IDE > Preferences for macOS) to open the Options dialog.
  2. Click on the Editor button. Then click on a tab to set up editor features.
Figure 7-2. Editor Options

Each tab and its options are listed below.

Table 7-1. General Tab
ItemDescription
Brace Matching

Check Show outline to see a line in the left-most margin connecting the matching braces.

Check Show tooltips to see a tooltip containing a hidden matching brace with context information.

Camel Case BehaviorCheck to enable camel case navigation.
SearchSelect Editor search behavior, either next search or final search.
Table 7-2. Folding Tab
ItemDescription
Code FoldingCheck to enable Code Folding and select which types of code to fold. For more on Code Folding, see Code Folding.

See also the NetBeans help topic:

netbeans.org/kb/docs/java/editor-codereference.html

LanguageSelect the programming language to which the options will apply.
Collapse by defaultSelect which types of code to fold/collapse.
Display OptionsContents Preview: Show preview of collapsed contents

Show Summary: Show summary of collapsed contents

Table 7-3. Formatting Tab
ItemDescription
LanguageSelect the programming language to which the options will apply.
CategorySelect a formatting category to edit.
StyleSelect from a current formatting style. Click Manage to add or delete styles.
Override Global OptionsCheck to override global options with the ones selected in this dialog.
Table 7-4. Code Completion Tab
ItemDescription
LanguageSelect the programming language to which options will apply.
Completion optionsCheck to enable code completion options. For more on code completion, see the NetBeans help topic:

netbeans.org/kb/docs/java/editor-codereference.html

Table 7-5. Code Templates Tab
ItemDescription
LanguageSelect the programming language to which the options will apply.
TemplatesEnter template information for the language specified above.

Abbreviation: Enter an abbreviation to type into the editor.

Expanded Text: After typing the abbreviation and the “Expand template on” character(s), expand the abbreviation to this text in the editor.

Description: Add an optional description of the template item.

For more on code templates, see the NetBeans help topic:

netbeans.org/kb/docs/java/editor-codereference.html

Expand template onSelect character(s) that will be typed into the editor to expand the abbreviated text to the expanded text.
On Template ExpansionSelect an action for when the template is expanded.
Table 7-6. Hints Tab
ItemDescription
LanguageSelect the programming language to which the options will apply.
Hint WindowIn the Hint window, select an occurrence.

For more on using hints, see the NetBeans help topic:

netbeans.org/kb/docs/java/editor-codereference.html

Show AsSpecify the “hint” you wish to receive in the event of the occurrence: Error, Warning or Warning on current line.
DescriptionView a description of the hint.
Table 7-7. Highlighting Tab
ItemDescription
LanguageSelect the programming language to which the options will apply.
Hintlighting ChecklistSelect the options for language syntax highlighting.
Table 7-8. Macros Tab
ItemDescription
MacrosAdd, delete and define editor macros.

To create a new macro, click the New button, enter the name for the new macro, then select the new macro in the list and enter the code, in quotes, in the Macro Code editor.

To set a keyboard shortcut for a macro, select a macro from the list, click the Set Shortcut button and enter the shortcut in the dialog box. Use this shortcut to run your macro.

To remove a macro, select a macro from the list and click the Remove button.

To modify the macro code, select a macro from the list and edit the code in the Macro Code editor.

Macro CodeClick on the macro name above and then type in your macro code in quotes.

For a list of macro keywords, see:

wiki.netbeans.org/FaqEditorMacros

Note: Generally, it is easier to add a new macro by recording it than by adding one manually in the Macro Code editor. Use Edit>Start/Stop Macro Recording.
Table 7-9. On Save Tab
ItemDescription
LanguageSelect the programming language to which the settings will apply when a document is saved.
Use all Language SettingsCheck to save all language settings.

Uncheck to specify Reformat and Trailing Whitespace options.

Table 7-10. Spellchecker Tab
ItemDescription
Use inSpecify the programming language(s) to be referenced for spellchecking.
DictionariesSpecfy the dictionaries to be referenced for spellchecking.
Default LocaleSpecify the default locale to be referenced for spellchecking.