Adding Context to Chat in AI

From the Cursor cheat sheet ยท Context Management ยท verified Jul 2026

Adding Context to Chat

Include relevant code and files

bash
# Selection context
Ctrl+Shift+L   # Add selected code to chat
Ctrl+L         # Add selection to new chat

# Clipboard context
Ctrl+V         # Add clipboard as context (auto-detect)
Ctrl+Shift+V   # Add clipboard to input box

# Reference operators
@              # Reference specific items
#              # Reference files
/              # Use shortcut commands

# Codebase search
Ctrl+Enter     # Search entire codebase in chat
bash
// EXAMPLE: Multi-file context
> @file1.ts @file2.ts How do these interact?

// EXAMPLE: Codebase search
> Find all API endpoints [Ctrl+Enter]

// EXAMPLE: Reference specific function
> @calculateTotal Why does this return NaN?
๐Ÿ’ก @ symbol references specific context
โšก Ctrl+Enter searches entire codebase
๐Ÿ” Clipboard auto-formats as context
๐Ÿ“Œ Multiple files can be referenced at once
contextreferencesearch

Continue with Cursor

Save the full cheat sheet or work through every related task.

More AI tasks

Back to the full Cursor cheat sheet