There are many productivity improving and usability tips and tricks related to the SQL Server Management Studio (SSMS). Ever since I started my blog (about 2 years ago), I have been writing mostly about these tips, and the list never ends! In today’s post, I will show how to configure the SSMS to recognize URLs within code comments.
One may place URLs in code comments for many reasons. Those that are applicable for me are:
- Referencing a specification
- Referencing a code defect/enhancement: The URL would point to the related TFS defect
- A link to Sharepoint or any collaboration tool that development teams may be using
- A link/citation to a website/blog that has been used as reference
For most languages & file extensions that the SSMS can handle, using Ctrl+click on any hyperlink opens the built-in web-browser and launches the associated page within SSMS. [One difference between SSMS for SQL 2012 and SQL 2008 is that the SSMS for SQL 2008 does not show the hyperlink in blue/underline].
The SSMS for SQL Server 2012 and below (tested for SQL Server 2008 and SQL 2008 R2), provide a text editor option – “Enable single-click URL navigation” that allows the user to control this behaviour. To access this option, go to Tools –> Options –> Text Editor –> All languages –> General (one can do this for specific languages too).
Un-checking this option will cause SSMS to stop recognizing hyperlinks within code comments:
The benefit of keeping “Enable single-click URL navigation” checked is that when developing and reviewing T-SQL code, it becomes very easy to reference and reach out to related documentation. I trust you found this feature useful.
Until we meet next time,