Skip to main content

Generate Code

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:

  1. Right-click in the editor to open up the context menu
  2. Select Generate code from the menu
  3. Input a natural language prompt in the text field
  4. Press Generate code
  5. 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 Generate again.
    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.