Perform a Rectangular Edit in the MPLAB® X IDE

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

Since version 3.0 and later, the editor in MPLAB® X IDE can perform rectangular selections and edits. This comes in handy when working with blocks of data. As an example, consider the array defined below:

Data Array

Let's say you want to replace the "8,9" at the end of all the rows with "3,4". With rectangular editing, you can easily replace the section as follows:

Click on the Toggle Rectangular Selection icon Toggle Rectangular Selection icon in the editor toolbar.

Select the region you wish to copy.

Type Ctrl+C to copy the data.

Turn on Rectangular selection, select the area and copy the selection


Select the data that you want to replace.

Selecting the area to paste into


Type Ctrl+V to paste and you will end up with:

The results of the paste


To return to regular editing mode, simply click on the Toggle Rectangular Selection icon Toggle Rectangular Selection icon again.