In my first post. Ctrl-Alt-DownArrow marks a “block insertion point” or whatever they may call that. Then you can just hit the space bar to insert a space (or whatever you type) in the insertion point on all lines marked.
I can look into VS and find the exact terminology if that is helpful.
I’ve done it for so long I don’t even remember if it is described somewhere inside VS. I’m poking around to see what I find.
… time passes …
And along with that (hope I’m not getting too greedy), when you have the block insertion points marked, you can also PASTE some text and it gets copied to all the insertion points. Really useful when creating some sort of data initialization, for instance, and you want the same thing at the beginning (or anywhere else) on every line of bunch.
… time passes …
I do the keystrokes so automatically I didn’t even remember what the keys were. I went into VS and did it and then noted what keystrokes I was doing. It is actually Shift-Alt-DownArrow (or UpArrow) to mark the insertion points. When you do that, a vertical line character appears on every line where at the point the insertion is to take place.
Still hunting for some official documentation for it. Don’t remember how I might have stumbled onto it. The same things work in Sql Server Management Studio editor for instance. So I think it is a common Microsoft thing.
I just found a place that pointed out that you can also hold down the Alt and use the mouse to drag over an area to do the block operations. I’m a keyboard kind of guy and find it quicker, easier, and more precise to use the keyboard to do those operations.
… time passes …
The only place I could find documentation was for sql server. I may very likely have found it there and then realized that it works just about everywhere in the Microsoft stuff, Word, SSMS, and Visual Studio, that I know of.
It is marking a block operation. So it could be an insert, or a paste point, or a deletion. If you mark a block of letters across a block of lines, you can press Delete to delete the selected letters.
For Sql Server, I found this: https://docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-keyboard-shortcuts?view=sql-server-2017
under “Text Selection Keyboard Shortcuts”.