Docs › Everyday work

Inline edit and explain

Press Ctrl+K (Cmd+K on macOS) to change a function or selection in place, or ask for an explanation.

Edit in place

  1. Put the cursor in a function, or select some code, in any editable file.
  2. Press Ctrl+K (Cmd+K on macOS), or right-click and choose Inline Edit Function or Selection.
  3. Describe the change. The result appears as an inline diff that you accept or reject.

Explain

Right-click and choose Explain Function or Selection. Both commands are also in the Command Palette.