Idea Options
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Notify Moderator
SQL syntax highlighting and formatting in SQL Editor
Status:
Implemented
Submitted by
JohnJPS
on
‎01-06-2016
12:52 PM
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Notify Moderator
The SQL Editor window could have a better presentation of the SQL code; two issues observed
- First, that it's simply plain text without even a fixed-width font, much less syntax highlighting
- Second, if you type in some manually formatted SQL code (e.g. with line feeds and indentation), then click on the "Visual Query Builder" button, then click back to the "SQL Editor" button, all the formatting is lost as it is converted to one run-on line of code, which is very difficult to read.
I understand that going between the Visual Query Builder and the SQL Editor is bound to have some issues; nonetheless the "idea" is to allow a user friendly display in the SQL Editor window:
- Use a fixed width font, (should be trivial to implement)
- SQL formatter, implementation ideas can be found here: https://github.com/TaoK/PoorMansTSqlFormatter
- SQL syntax highlighting, implementation ideas can be found here: https://github.com/jdorn/sql-formatter
My "implementation ideas" are based on a couple minutes with google, so hopefully this is a very feasible request; my user base is very likely to spend more time in the SQL editor than not, so this would be a valuable UX addition. Thanks!
A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting. - jdorn/sql-formatter
A small free .Net and JS library (with demo UI, command-line bulk formatter, SSMS/VS add-in, notepad++ plugin, winmerge plugin, and demo webpage) for reformatting and coloring T-SQL code to the user's preferences. - TaoK/PoorMansTSqlFormatter
See more ideas labeled with:
36 Comments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.