Editing Code in the MPLAB® X IDE

Last modified by Microchip on 2024/06/24 06:31



Editor Window

The Editor Window

Double-clicking on a file from the Projects tab of the Projects window launches the MPLAB® X Editor, which opens the source file in the Editor window.

The user enters the modifications directly in the window.

MPLAB X saves all modified files when the project is built. The user can also save any modified files directly by clicking the Save icon in the editor window toolbar.

Features of the Editor

Live Parsing

MPLAB® X Integrated Development Environment (IDE) continuously parses code as you type, allowing it to highlight errors as they occur. Because many mistakes are caught as they happen, the tedious compile-correct cycle one usually has to go through will be dramatically diminished in its duration.


MPLAB X IDE's refactoring tools simplify the task of restructuring code without changing its function. For example, if you wanted to change the name of an identifier, refactoring may be used as an alternative to the error-prone process of using search and replace. Because the editor is language-aware, it is able to find and correctly update all instances of the item immediately.

Code Assistance

As you type your code, the editor will provide lists of possible completions with the most common or most likely options at the top. Code completion is triggered by typing the first letters of a CamelCase word.

Go to File, Go to Type, Go to Symbol

Our IDE makes it easy to navigate to files, types, or symbols with quick keyboard shortcuts or to jump to declarations with a single mouse click.
Typing file or type names into Go To dialogs will perform a case-sensitive search across all open projects.

Fully Configurable User Interface

  • All windows can be individually positioned.
  • All windows can be split horizontally or vertically.
  • Setup custom keyboard shortcuts.
  • Configurable toolbar buttons.
  • Configurable behavior for code completion, documentation pop-ups, keyboard shortcuts, editor fonts and colors.
  • Export and import settings to make a backup of your settings or share them with a team.

File History

MPLAB X IDE keeps track of the changes you have made to a file. To view the differences between two versions of a file side by side, right-click on file under the Projects tab and select Local History from the popup menu. You can also choose to revert to an earlier version all without the use of a version control system.