Closed matthiasmast closed 6 years ago
same also applies for things like explain plan (Ctrl+e Ctrl+x). Seems like they are using the expand_to option. I've configured it to line for executing query as there is the handy shortcut with Ctrl+e Ctrl+a. But for these other tasks I'd like to have it expand to the whole file
Matthias, I do understand your frustration.
Indeed, the recent releases introduced this kind of change which makes all commands to act either on selected text or the piece of text controlled by setting expand_to
(current line, current paragraph or file).
On one hand, this change brings consistency among different commands in regards to what piece of text is acted upon by SQLTools, which makes it more predictable. On the other hand, I do understand, that this change breaks some of the habits and workflows for existing users of SQLTools who are already used to the old behavior.
I'm a heavy SQLTools user myself and I think that this consistent behavior is important, especially for new coming users, as well as I do understand your concerns.
I think it would make sense to create a separate SQLTools command to format the whole file to cover your needs (something like ST: Format All File
which is similar to existing ST: Execute All File
).
Thanks for your answer. I can think of 2 meaningful solutions. One would be, as you suggested, to introduce a shortcut for each of the actions for the whole file. The other would be to configure the expand_to option individually for each action.
Bug/Error
Description
Formatting does not format whole file anymore but only the current line.
Version
Steps to Reproduce (For bugfixes)
Expected behavior: formatting the whole fole
Actual behavior: formatting only the cursor line