Editor Options

To set editor options:

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

Each tab and its options are listed below.

Table 1. General Tab
Item Description
Code Folding Check 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:

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

Camel Case Behavior Check to enable camel case navigation.
Table 2. Formatting Tab
Item Description
Language Select the programming language to which the formatting will apply.
Category Select a category, currently only “Tabs and Indents.”
Expand Tabs to Spaces Check to make tabs into spaces.
Number of Spaces per Indent Enter the equivalent number of spaces per indent.
Tab Size Enter the size of a tab.
Right Margin Enter the size of the right margin.
Table 3. Code Completion Tab
Item Description
Language Select the programming language to which code completion will apply.
Completion options Check to enable code completion options. For more on code completion, see the NetBeans help topic:

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

Table 4. Code Templates Tab
Item Description
Language Select the programming language to which the template will apply.
Templates Enter 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:

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

Expand template on Select character(s) that will be typed into the editor to expand the abbreviated text to the expanded text.
Table 5. Hints Tab
Item Description
Language Select the programming language to which the hints will apply.
Hint Window In the Hint window, select an occurrence and specify the “hint” you wish to receive in the event of the occurrence: Error, Warning or Warning on current line.

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

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

Table 6. Macros Tab
Item Description
Macros Add, 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 Code Click on the macro name above and then type in your macro code in quotes.

For a list of macro keywords, see:

http://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.