ALT + Click to perform multi cursor edits

Speed up your SQL development with this one trick!

… No but seriously, this little hack makes SQL coding so much more convenient.

Most SQL development environments have the possibility to perform so called “Multi Cursor edits” (also called “Box selection”). Meaning, you can edit several lines in your block of code at once.

In a lot of development environments this can be done using ALT + click left mouse button. When you hold ALT + the left mouse button, and start dragging your mouse (while still holding ALT), you can select the lines that you want to edit. When you’ve selected the desired lines, you can add/remove functions, etc.

Some development environments allow the “HOME”- and “END”-buttons to be used in combination with the multi cursor modifier. This makes it really easy to add functions at the start of the lines you wish to edit (using HOME) and then later add a closing parenthesis at the end of the lines (using END).

As a final note, this does not just work for SQL development. If the development environment allows you to write other languages, you can of course use the multi cursor modifier for those languages in your editor as well. VS Code is a prime example, although in VS Code you have to use SHIFT+ALT+CLICK instead of ALT+CLICK.

Leave Comment

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *