This extension adds several editor commands to SQL Server Management Studio 18.x.
I use Visual Studio for front-end/back-end coding and db scripting. SQL Server Data Tools component that comes bundled with Visual Studio is really good and it does the job most of the time. But it also has some bugs (random CPU spikes, table viewer filtering bugs, etc.) that never get fixed. The only reason I sticked to it was some of the Visual Studio extensions that I couldn't live without (Trailing Whitespace Visualizer and Subword Navigation) and AFAIK SSMS didn't support extensions out-of-the-box. Then I learned that SSMS actually supports extensions (or maybe a subset of them) becuase it uses Visual Studio Isolated Shell.
Changes the document's encoding to UTF-8 (without BOM) and saves the document.
- Replaces all
[
and]
characters with"
(Personal obsession), - Removes excessive trailing newline characters from EOF,
- Converts certain SQL keywords (
ALTER
,CREATE
,DELETE
,INSERT
,SELECT
) into lowercase (if they are in the beginning of the line) - Removes trailing whitespace
These are my substitudes for ctrl + →
, ctrl + shift + →
, ctrl + ←
and ctrl + shift + ←
. They use ITextStructureNavigator.GetExtentOfWord
under the hood.
Some of the code in this project was taken from or inspired by the following repositories:
- https://github.com/madskristensen/TrailingWhitespace
- https://github.com/ow--/vs-subword-navigation
- https://github.com/VsVim/VsVim
- Clone the repo.
- Build it. (preferably using VS2017)
- Make sure SSMS isn't running.
- Extract (unzip)
SSMSEditorEnhancements.vsix
intoSSMSEditorEnhancements
and copy that folder intoC:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Extensions\
- Run SSMS. Commands will be listed under
Tools
menu but you'll probably prefer creating shortcuts for those commands.