Closed DIMANRUS closed 2 weeks ago
Okay the problem is in sql files, the extension maps the keyboard shortcut cmd/ctrl+d+e
So vscode sees the cmd/ctrl+d and is waiting for the e.. and not letting default action happen (the extensions action takes priority I believe as it is tied to the language rather than a general editorfocus).
I liked cmd/ctrl+d as it was d for database, and opened up the option for cmd/ctrl+d+p to say execute and show plan... or cmd/ctrl+d+t for execute to new tab (both not build yet, just planning).
Obviously people can re map the cmd+cltr+d to whatever they want.. but maybe I need to find a new default that does not break native code..
cmd/ctrl+enter was one I considered, but by default it's mapped to inserting a new line blow
Any suggestions ? @devpkr1 any thoughts ?
It seems like many users, myself included, are used to using ctrl+Enter for executing statements, as it’s the default in most native database clients. While ctrl+Enter is currently mapped to inserting a new line below in VSCode, I suggest changing that shortcut to something more appropriate, like shift+Enter, and keeping ctrl+Enter for executing statements.
This way, users can retain the familiar ctrl+Enter for execution, and shift+Enter feels intuitive for adding a new line, maintaining a smooth workflow. What do you think of this approach?
Hi Mike, I also wants to say that while executing statements in .sql file it automatically execute all statements not that particular line where the cursor is located , sometimes that is annoying as when we use native database clients it only execute one statement where the cursor is located or only selected statements.
Please resolve this also.
Thanks and Regards Pradeep Kumar
Thanks for the feedback.. I don't want to do executing where the cursor is at this stage as it's super risky... if the parser ges the statement boundaries wrong it could execute a lot more than you expect.
You can highlight a section of code, and then it will execute the selection.
I cannot change vscode's default keyboard maps.. have to work around them.. so cmd/ctrl+enter would clash with the new line option... basically it would not work in any .sql files.
Ok, I agree with your points, but shift + enter is already doing the job of adding a new line below, so could you use that ctrl + enter for execution if possible.
On Thu, 10 Oct 2024, 10:52 pm mikeburgh, @.***> wrote:
Thanks for the feedback.. I don't want to do executing where the cursor is at this stage as it's super risky... if the parser ges the statement boundaries wrong it could execute a lot more than you expect.
You can highlight a section of code, and then it will execute the selection.
I cannot change vscode's default keyboard maps.. have to work around them.. so cmd/ctrl+enter would clash with the new line option... basically it would not work in any .sql files.
— Reply to this email directly, view it on GitHub https://github.com/dbcodeio/public/issues/49#issuecomment-2405662849, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHX3Z5MNERWDDIIUE7QQZ63Z22ZUHAVCNFSM6AAAAABPWVQNU2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBVGY3DEOBUHE . You are receiving this because you were mentioned.Message ID: @.***>
Yes, not sure why they have specific command for it when it's default functionality.
I have switched the shortcut over to cmd/ctrl+enter in version 1.3.0 and above.
should fix this issue, and make it more standard with other tools moving forward
Hello. I noticed that when editing the procedure code, the vs code system keyboard shortcuts do not work, but they work if you just open the file, I am interested in the keyboard shortcut in the photo