timestored/qstudio

Feature request: New "Query" command that handles entire window of text

richb-hanover opened this issue · 1 comments

I changed my mind re: #89. Here is a way qStudio can solve that problem. (TL;DR: Cmd-E / Ctl-E sends the selected text. If the selection is a partial PRQL query, the error message that returns is particularly abstruse.)

Proposal: Add a new menu command named simply "Query" that processes the entire window of text. Attach a reasonable keyboard shortcut.

Reasoning:

  • Making a query of the entire window's text is a frequent operation. It deserves its own command
  • I was always curious why qStudio only offered "Query selected text", but was also relieved that the default was the entire text if there wasn't a selection
  • Having a good keyboard shortcut is important: people will train their fingers to use it and never think about it again
  • Keyboard shortcut might be Cmd-Shift-E (Ctl-Shift-E) or any other reasonable alternative. I was hoping for Cmd/Ctl-R, (mnemonic for "run") but that's already taken. I definitely do not want to disturb other people's "trained fingers" - I'm the newcomer, I can learn Cmd-Shift-E...

Update: I recorded a movie of me screwing up. https://youtu.be/AquxzK8l4f4

Here's what happened:

  • The take 100 line was not commented: Cmd-E worked as expected.
  • I then commented that line out (Cmd-/) and wanted to re-run the query (with Cmd-E), but I got the PRQL error.
  • I then clicked to remove the selection, and Cmd-E worked as expected.

My request: to create a keyboard shortcut that sends the entire pane of text, regardless of what's selected.