Tab Completion
Inline AI suggestions that predict what you\u2019ll type next \u2014 from single tokens to entire functions.
What's possible
- Complete function bodies from a signature or comment
- Finish repetitive patterns (imports, switch cases, test assertions)
- Predict the next line based on surrounding code context
- Accept partial suggestions word-by-word
- Multi-line block completions for loops, conditionals, and handlers
Getting started
- 1
Start typing code
As you type, Cursor predicts what comes next and shows ghost text inline. Suggestions appear automatically — no shortcut needed.
- 2
Accept with Tab
Press Tab to accept the full suggestion. Press Ctrl+Right Arrow to accept word-by-word for partial acceptance.
- 3
Reject with Escape
Press Escape or keep typing to dismiss the suggestion. Cursor will generate a new one based on your updated context.
- 4
Multi-line completions
Tab can suggest entire blocks — function bodies, conditionals, loops. Accept the first line and Tab again to continue.
Example scenarios
From a function signature
“function calculateTax(income: number, rate: number): number {”
From a comment
“// Sort users by last name, then first name”
Completing a pattern
“const [loading, setLoading] = useState(false);”
Tips
- Write descriptive function names and comments \u2014 Tab uses them as context for better predictions.
- Tab learns from your current file and open tabs. Keep related files open for better suggestions.
- If suggestions are too aggressive, adjust the Tab completion settings in Cursor Settings.
- Tab works best for boilerplate and patterns. For complex logic, use Chat or Composer instead.