mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.43k stars 291 forks source link

Keyboard shortcut to execute commands #1210

Closed mrbing47 closed 10 months ago

mrbing47 commented 10 months ago

As VS Code is a keyboard extension IDE, it breaks my flow when I when to grab my mouse to select "Run the command on active connection".

It would be a nice feature to add keyboard shortcut (like CTRL + ENTER) to run the query there my cursor is currently at for the sake of convenience.

gjsjohnmurray commented 10 months ago

Some keyboard shortcuts are already added by the extension. Search for sqltools in the Keyboard Shortcuts editor to see them.

You could add shortcuts of your own to run other commands for which the above search doesn't show a default keybinding. For example, the command SQLTools Connection: Run Current Query would do what I think you want.

Alternatively, bind Show CodeLens Commands For Current Line to a keyboard shortcut, then use it to access any CodeLens from the keyboard. But be aware that VS Code currently has a bug that means you will have to press Enter twice to trigger the selected CodeLens.

aodendaal commented 1 week ago

To save the next person looking Ctrl+E Ctrl+E for SQLTOOLS Connection: Run Selected Query.

SQLTOOLS Connection: Run Current Query is unmapped.