Code Blocks





Microsoft Visual Studio has very nice feature called regions. You can define a region of code with #region and #endregion special directives and the code between these keywords is treated as a block of code by the editor. Code blocks can be expanded and collapsed during coding which will allow you to focus on the region of code you are most interested. Surely this helps programmers very much during code navigation and debugging.

PragmaSQL has support for regions ( code blocks ). You can define code blocks with special #block and #endblock keywords and provide a description for the code between these special keywords. PragmaSQL code blocks follow a special pattern. Code block keywords are placed in single line comments and you put the description of the block right after the #block keyword starting with < and ending with > special characters. Code blocks can be nested.

Multiline T-SQL comments are also treated as code block by PragmaSQL.

Shaded Code Blocks (Select/Case)





PragmaSQL script editor introduces the concept of Shaded Code Blocks. Select and Case code blocks are shaded with optional background colors as you navigate through the code.

When the cursor position changes and hits a valid select or case block only the background of the respective script editor region is painted with the color of your choice. With shaded code blocks you can keep focused on your T-SQL code.

Customizable Script Editor Shortcuts





PragmaSQL script editor shortcuts can be customized through Options menu by navigating to
Script Editor -> Shortcut Keys node.