I don't think I'm alone in spending a fair amount of my programming time moving bits of code from place to place, often within the same file. However, in my experience thus far, every time I cut/copy and paste some code I need to manually realign the spacing so that the pasted code is corrected indented and aligned.
For example in the following code I have pasted the weight arrays to inside my for loop. The spacing is wrong.
weight[v1_t]=1;
weight[v2_t]=12;
if (connected(g)) {
cout << "I'm connected";
weight[v1_t]=1;
weight[v2_t]=12;
}
I have tried all combinations of where I highlight my selection from and where I position the cursor for pasting to, without success. I have not seen any difference in any editors.
Am I just unaware of the correct technique or are there specific editors that solve this problem or has this minor nuisance just gone under the radar?