Vscode-mssql: Support F5 to run query

Created on 2 Oct 2020  路  3Comments  路  Source: microsoft/vscode-mssql

  • MSSQL Extension Version: 1.9.0
  • VSCode Version: 1.49.0
  • OS Version: Windows 10

Steps to Reproduce:

When I have written a query, it would be great to be able to F5 and execute it, like other Run scenarios in code

enhancement

Most helpful comment

Can't you bind the mssql.runQuery command to f5 and have then "when" clause as "editorTextFocus && editorLangId == 'sql'"?

All 3 comments

Can't you bind the mssql.runQuery command to f5 and have then "when" clause as "editorTextFocus && editorLangId == 'sql'"?

I _could_, but I'm curious why it doesn't do it for me? (I didn't actually know I could do that sort of mapping until just now!
Ctrl+Shift+E seems to be the default, but that doesn't match SSMS ... but this worked, thanks :)

@Offbeatmammal Like @MartinRiddar correctly pointed out, you can set your own keybindings. We don't want to override the default F5 behavior of vscode since a lot of users are used to it already, and hence the Ctrl/Cmd + Shift E shortcut for Execute Query

Was this page helpful?
0 / 5 - 0 ratings