DEV Community

Zac
Zac

Posted on

Cursor keyboard shortcuts that actually save time

Most developers use maybe five keyboard shortcuts in any editor. Cursor has some that change how you interact with AI suggestions specifically. Here are the ones worth learning.

The basics (if you're new to Cursor)

  • Cmd+K / Ctrl+K — inline edit prompt. Opens a small input to modify the selected code
  • Cmd+L / Ctrl+L — open chat panel with selected code as context
  • Tab — accept autocomplete suggestion
  • Escape — reject autocomplete suggestion
  • Cmd+Shift+L — add current file to chat context

The ones that speed up the workflow

Cmd+K on empty selection opens the inline prompt focused on the current line. Useful for quick one-liner fixes without opening the full chat.

Cmd+Enter in chat submits with full file context. Regular Enter submits with whatever you've @-mentioned. Know the difference before you accidentally share a large file.

Cmd+/ toggles AI suggestions off for the current session. Useful when you're in design/thinking mode and don't want the distraction of inline completions.

@-mentions in chat:

  • @filename — add a file to context
  • @folder — add all files in a folder
  • @web — include a web search
  • @docs — reference documentation for a library

Tab behavior

Cursor's tab completion suggests more than one token at a time. It will sometimes complete an entire function body if it's confident. This is fast but requires attention — scan what it wrote before tabbing past it.

If a suggestion is mostly right but not quite, don't reject it and retype. Accept it, then use Cmd+K to ask for the specific modification.

Multi-cursor + AI

Cursor works well with VS Code's multi-cursor (Cmd+D to select next occurrence, Opt+click to place cursors). Select multiple occurrences of something you want to change, then use Cmd+K to modify all of them at once.

What doesn't have a shortcut but should

There's no single shortcut to "accept this diff and move to the next file" in agent mode. You have to click. This is annoying on large diffs — hopefully they fix it.

The one to learn first

Cmd+K for inline edits. It's the most targeted way to interact with the model: you select exactly what you want changed, describe the change in one sentence, and get a diff you can accept or reject. Less ceremony than opening the full chat.

Full .cursorrules setup guide: builtbyzac.com/cursor-rules.html.

Top comments (0)