I have a code like this
const
value1 = 1;
value2 = 2;
value4 = 3;
.
.
.
valuen = n;
and say I want to add value3 = 3;
to the list without having to deal with the pain of editing all the values to n.
Is there a intrinsic method or a trick that can be done to make this easier in the future?
Use the Delphi editor.
Step 1: Add the new const variable in its right place:
const
value1 = 1;
value2 = 2;
value3 =
value4 = 3;
value5 = 4;
value6 = 5;
value7 = 6;
Step 2: Use the column block selection shortcut to select from 3 to the end of the list. To turn on column mode selection, press Ctrl+O+C and mark the block. Alternatively, drag the mouse with the Alt key down.