Inline Edit.
An AI editing mode where you select code in your editor, describe a change in natural language, and the AI applies the change in place — showing a diff for review before accepting.
Inline editing (sometimes called 'in-editor editing' or 'cmd-K' after the common keyboard shortcut) is the primary interaction model for AI code modification in tools like Cursor, Windsurf, and Zed. You select a function, class, or block of code, invoke the AI with a keyboard shortcut, describe the desired change, and the AI generates a modified version shown as a diff that you can accept or reject.
The inline edit workflow is well suited to targeted, bounded changes: refactoring a function, adding error handling, translating a code block from one language to another, or adding documentation. It's faster than switching to a chat window and copy-pasting code back and forth, and the diff view makes it easy to verify what changed.
Most modern AI code editors support both inline edit (for targeted changes to selected code) and agentic chat (for multi-file changes described in conversation). Knowing when to use each is a skill: inline edit for local changes, chat/agent for broader feature work that touches multiple files.