troubleshooting Question

Select vertical column, uneven word endings

Avatar of Tom Knowlton
Tom KnowltonFlag for United States of America asked on
Microsoft WordMicrosoft Visual Studio
4 Comments1 Solution142 ViewsLast Modified:
private int custid = -1;
private string partnumber = "";
private string description = "";

When editing source code, Is it possible to do a sort of SHIFT + ALT + LEFT CLICK, such that the vertical selection happens across all second spaces in a series of lines?  I don't think VS 2017 Community supports macro recording?  Or Visual Studio, period ... not for many years now, right?

For example, for the first line of code above, imagine the text cursor is blinking **just** after the " t " in "int".  This is the end of the second word on that line, or said another way, it is just before the second space.

To select the same spot for the second and third lines would select just after the " g " in the word "string" on those lines.

Then a few tabs would result in the following:

private int                               custid = -1;
private string                          partnumber = "";
private string                          description = "";

Then I could go back to the beginning of that THIRD column, do a normal SHIFT + ALT + LEFT CLICK from the " c " in custid down to the " d " in description, and add a character (say, an underscore) at the beginning of all of those variable names, like so:

private int                               _custid = -1;
private string                          _partnumber = "";
private string                          _description = "";



Possible?

Open to a RegEx solution for my search and replace, but preference is some sort of keyboard command.

NOTE:  I found "Tabify" under the Edit - Advanced menu ----- it does not seem to work at all?  It seems to be what I want, but not available in C# text editor?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros