# Inline edit and explain

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

Source: https://frankencoder.com/docs/inline-edit

## Edit in place

1. Put the cursor in a function, or select some code, in any editable file.
2. Press <kbd>Ctrl</kbd>+<kbd>K</kbd> (<kbd>Cmd</kbd>+<kbd>K</kbd> 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.
