Select vertical column, uneven word endings

Tom Knowlton
Tom Knowlton used Ask the Experts™
on
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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Consultant
Awarded 2017
Distinguished Expert 2018
Commented:
Tabify replaces four spaces with a Tab.

You can try shortcut CTRL+ALT+] with ProductivityPowerTools installed
https://marketplace.visualstudio.com/items?itemName=VisualStudioProductTeam.ProductivityPowerPack2017
Tom KnowltonWeb developer

Author

Commented:
I wish I could give you 500,000 points.  This was precisely what I needed.

Many many thanks!

Tom
Tom KnowltonWeb developer

Author

Commented:
Oh, and thank you for the clarification on "Tabify" - noted!!!!

Tom
Shaun VermaakSenior Consultant
Awarded 2017
Distinguished Expert 2018

Commented:
Anytime, glad it solved it :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial