Run Swift Code Without Saving #320
-
I'm new to VSCode and Swift, so pardon me if this has been asked somewhere else. With Xcode when I open a playground I have to create that file first. A lot of times I'd like a quick scratchpad where I can hash out ideas in a lightweight environment and not within a whole project. Currently, one is required to create a playgrounds file somewhere and then remember to throw it away later. In VSCode I can create a new tab, select the Swift language and get all the autocompletion, which is great. Is there a way I can run my code without saving the file first? I can do this sort of thing in TextMate, but I don't get any autocompletion which is the downside. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Can you find |
Beta Was this translation helpful? Give feedback.
Can you find
Swift: Run Swift Script
in the commands palette (⌘+⇧+P)? It should be able to run a Swift script directly, whether it is saved or not.