With Generate Code, you can give Ghostwriter a natural language prompt, and Ghostwriter will return a block of code to fulfill the purpose. This feature can write large chunks of code at once, so it's useful when you want to write small programs or several related functions in one shot.
To use Generate Code, follow these steps:
- Right-click in the editor to open up the context menu
Generate codefrom the menu
- Input a natural language prompt in the text field
- Ghostwriter will provide suggested code. From here, you can choose to:
A) Type a new prompt - Refine your prompt and try again.
B) Generate - If you want to try again with the current prompt, press
C) Copy to clipboard - Copy the code block, so you can paste wherever you want.
D) Insert in editor - Paste the code directly into the editor where your cursor is.
E) Share feedback - Don't like the suggestions? Help us improve by providing feedback.