mickeypearce / vscode-oracle-format

PL/SQL formatter (using SQLcl)
https://marketplace.visualstudio.com/items?itemName=mp.vscode-oracle-format
11 stars 4 forks source link

Format unsaved documents #4

Closed stuartisaac closed 5 years ago

stuartisaac commented 5 years ago

I request that the extension be made to work for unsaved documents. This could presumably be implemented by detecting if there are unsaved changes, and if so, copying the contents to a temporary file, having SQLcl do its thing on the temp file, then copying the formatted contents back to the document.

mickeypearce commented 5 years ago

Check out the new version. It should work as you suggested with the temporary file involved, for all the cases including Format Selection command. #1

@stuartisaac, thanks for this improvement idea. :1st_place_medal:

stuartisaac commented 5 years ago

Yes, that looks great. Thanks!