Inline Editing

Inline Editing (⌘/Ctrl I)

Inline Editing allows you to make quick code changes directly within your editor without opening the full Sweep sidebar.

How to Use Inline Editing

  1. Select the code you want to modify in your editor
  2. Use the keyboard shortcut ⌘/Ctrl I to open up the prompt bar
  3. Type your instruction describing what changes you want to make
  4. Review the generated code edits and choose to accept or reject them

What Context Does the AI See?

When you activate inline editing on a selection:

  • The AI sees the entire file you're currently editing for full context
  • Only the selected lines are rewritten - changes are limited to your selection
  • This gives the AI enough context to understand surrounding code, imports, and dependencies while keeping edits focused

Full File Editing

By default, inline editing is limited to the selected code. If you need to apply changes to the full file, (e.g. turning selected code into a helper function) use full file editing mode. To toggle between Inline and Full File editing modes, use the dropdown or the keyboard shortcut ⌘/Ctrl Shift Enter

Keyboard Shortcut

ActionMacWindows/Linux
Open Inline Edit Prompt⌘ ICtrl I
Toggle Editing Mode⌘ Shift ICtrl Shift Enter