arnoudkooi / sn-scriptsync

Use sn-scriptsync in combination with SN Utils to be able to code in VS Code, including all benefits of a full fledged code editor
https://marketplace.visualstudio.com/items?itemName=arnoudkooicom.sn-scriptsync
Other
43 stars 28 forks source link

Request: Refresh SN Script in Visual Studio Code #62

Closed Trampf closed 2 years ago

Trampf commented 2 years ago

Hey Arnouud,

would it be possible to have a button to refresh the script in VS Code to get the current version from ServiceNow?

Sometimes I have the issue, that the Versions I have in ServiceNow are not the same as the VS Code. Then I always have to go the script and reload it again.

It would be very comfortable to refresh the script from inside VS Code.

arnoudkooi commented 2 years ago

The idea is to keep the instance leading (source of truth) and use VS Code as a companion. Having that said, I'll have a look :)

NeuraalLabs commented 2 years ago

+1 I came here looking for this exact feature. SN would still be the source of truth, would be great if we can execute a command to refresh all the items open in VSC with the code in SN

arnoudkooi commented 2 years ago

Please upgrade and check. see this tweet Besides the refresh Open in Instance command is added

Assigned shortcuts

            {
                "command": "extension.openInInstance",
                "key": "ctrl+alt+i",
                "mac": "ctrl+cmd+i"
            },
            {
                "command": "extension.refreshFromInstance",
                "key": "ctrl+alt+r",
                "mac": "ctrl+cmd+r"
            }
NeuraalLabs commented 2 years ago

@arnoudkooi AWESOME! This is great. Thank you!

Not to look a gift horse in the mouth, but do you see any possibility for being able to do it for everything open in a workspace with a single command?

Trampf commented 2 years ago

@arnoudkooi Super cool! Thanks for implementing it!

NeuraalLabs suggestion is also great to refresh the whole set, but I am super happy with your new update. Works like a charm!