The Alt key in SQL Server Management Studio, functions as “vertical mode”. If we press the alt button whilst clicking and dragging the mouse, we can select a vertical block of text like this:
When then press Tab to insert spaces, or press Delete to delete the word KPI from all 3 lines in one go.
After pressing Delete, we can type “Target” and the word Target will be inserted in all 3 lines in one go, like this:
The vertical blue line is the cursor. When this blue line appear, we can press shift-left or shift-right to block text in “vertical mode”. Press shift-down or shift-up will extend/reduce the blocked text by 1 line, like this:
When some text is highlighted like the above, we can find or replace any text, within just the selected area. To do that, just press ctrl-F or ctrl-H like this:
Also, when some text is highlighted in vertical mode, we can drag them to the right or to the left (all 3 lines in one go), like this:
When we want to type the same thing on many lines, press alt, highlight 1 character/column over many lines, and start typing, like this:
Hope this helps.
Leave a Reply