Keyboard shortcut to reformat code quit working
amSteve
Posts: 5 New member
My key chord of 'Ctrl + K + Y' has become unassigned. Not exactly sure when but recently. Might have coincided with install of SQL's ctp 2 but i didn't (intentionally) change anything re: my original install of mssms (Microsoft SQL Server Management Studio 12.0.2000.8). And i haven't yet installed sql prompt beta.
not seeing a keyboard assignment in options.
not seeing a keyboard assignment in options.
Comments
Is it just the Format SQL shortcut that has stopped working or have all the keyboard commands stopped? If you right click on a query window are any shortcuts listed?
Thanks,
Aaron.
SQL Prompt should set the keyboard shortcuts on startup if they aren't correct - Installing a new SSMS might have caused a few things to get reset but Prompt should re-bind the keyboard shortcuts.
Could you try enabling verbose logging (Prompt->Help->Enable Verbose Logging) then restart SSMS and have a look at the log (Prompt->Help->Show Log) if you search for FormatSQL you should see some lines that look like: I'm wondering what yours look like?
Thanks,
Aaron.
However, I prefer FormatSQL bound to Ctrl-KD, just like Visual Studio. I also remove the Ctrl-BL and Ctrl-KY bindings to teach my muscle memory to always use Ctrl-KD.
Unfortunately, SQL Prompt appears to wipe out this change, replacing my keys with its defaults.
It's possible to change what these defaults are if you're happy to edit an xml file as described here. (but with editing the same xml file in the Prompt 7 local app data and using SQL::Ctrl+K,Ctrl+D)
Hopefully the next version of SSMS will support extensions (currently only addins are loaded) which has a more reliable command system that'll allow you to rebind them using the standard options in SSMS.
Let me know if you have any difficulty with rebinding the shortcuts.
Thanks,
Aaron.