RFE: select block by columns
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Scribes |
New
|
Undecided
|
Unassigned |
Bug Description
Some editors have a very useful feature: to make a selection based on a series of columns. For example, say you're using C++ and you have some class:
class A
{
int Field1;
int Field2;
int Field3;
int Field4;
};
and now you want to copy some of those fields, and some not:
A a, b;
a.Field1 = b.Field1;
a.Field2 = b.Field2;
a.Field3 = b.Field3;
So, what I would like to do would be to select the field names from the class using columns, highlighting from "Field1" to "Field3", which I will simulate here using brackets:
class A
{
int [Field1];
int [Field2];
int [Field3];
int Field4;
};
then copy that to the clipboard, and then I would write:
a. = b.;
and duplicate that line three times:
a. = b.;
a. = b.;
a. = b.;
and then paste twice, once after the "a." in the first line, and the second time after "b." in the first line:
a.Field1 = b.Field1;
a.Field2 = b.Field2;
a.Field3 = b.Field3;
Naturally, if field names are not of the same length, you have to manually correct here and there, but it's minimum.
Such a feature is available in several editors like brief, SemWare e32, Visual Studio, Notepad++, Vim, etc. and has a lot of useful cases, like erasing unwanted spaces in tables, duplicating partial blocks, etc. See: http://