

Turn on Auto Save, so you'll never forget to save your work.Īuto Save is disabled by default. If you want to focus on a query without the extra distractions of File Menus, notifications, etc., use Zen Mode.Īctivate/Deactivate Zen Mode from the Command Palette. From the Explorer sidebar, right-click on the file for comparison and click Compare with Selected.From the Explorer sidebar, right-click on the file and click Select for Compare.Need to see the differences in queries or see what might have changed between two files? Let ADS show you with Compare differences. This functions just like Side by Side editing, but instead, you drag the same file or Open Editor group from the Explorer sidebar onto the desired area. Side by Side editing also works for the same file, handy when working on a long query spanning greater than the screen height.

Alternatively, drag and drop an editor tab to the desired area.From the Explorer sidebar, drag and drop either a file or Open Editor group to the desired area.Work on one query while referring to another Use Box Selection by holding down shift + alt (Mac: shift + opt), then holding the left mouse button and drag where you want to highlight. Holding down alt (Mac: opt) and double-clicking a word will add it to the currently highlighted selection.Ī variation on this is Box Selection, highlighting text in a square or rectangular block. This same feature can highlight multiple bits of code. To drop multiple cursors into a query is as easy as holding down the alt (Mac: opt) key and left-clicking with the mouse where you want the additional cursors. If you want to make a change in many places simultaneously, then try Multiple Cursors. Mac: opt + shift + up or opt + shift + down.Windows: alt + shift + down or alt + shift + up.This shortcut also works with blocks of selected text. We don't need to cut and paste to move a line. Want to rename something, and in all the places it's used, e.g., rename a variable? Try Change all occurrences. Transforming the case is even more useful when you combine with multiple selections.įurther, the commands can be bound to a keyboard shortcut reducing the need to use the Command Palette. Bring up the Command Palette (Windows: ctrl + shift + p, Mac: cmd + shift + p) and type either "upper" or "lower".The search and replace below will remove open and closing square brackets from a query in one action (if you, like me, find the square bracket syntax noisy and hard to read). Enter the search pattern and replace as required.Set the search to use Regular Expressions.Open the Command Palette and type "replace.".With a Regular Expression search and replace, we search for a text pattern instead of exact text, which lets you modify more text in one go. Search and Replace with Regular Expressions A foldable region starts at a line whose next line has a greater indent and ends when the indent is the same as the starting line. Mac: opt + cmd + ĪDS determines a foldable region by evaluating the indentation of lines.Want to hide a region of a query, e.g., hide a sub-query while editing the outer query. This also works for tables, i.e., SELECT table.*.Press Enter to replace * with all column names.You should see a concatenated list of all column names Trigger IntelliSense (Windows: ctrl + space, Mac: ctrl + space).Known as Star Expansion, this takes an asterisk in the SELECT clause and replaces it with all column names. On Windows, the Join Lines command is not bound to a keyboard shortcut but can be set in Keyboard Shortcuts. On Mac, the shortcut for this is control + j Got a compact statement that could fit on one line? Use the Join Lines command. Familiarising yourself with this tool will help you get a lot more out of Azure Data Studio. The Command Palette is designed for performing actions from the keyboard.

To access the Command Palette in Azure Data Studio press: Commands do things such as modify your current code, connect to a data source, or change a setting. The Command Palette is the searchable prompt where Azure Data Studio's many commands are accessed.
MICROSOFT AZURE DATA STUDIO CODE
