Autocompletion with multi-line edits, cross-file suggestions, and context-aware code completions
Tab is a specialized Cursor model for autocompletion. The more you use it, the better it becomes as you inject intent by accepting Tab or rejecting Esc suggestions. With Tab, you can:
When adding text, completions appear as semi-opaque ghost text. When modifying existing code, it shows as a diff popup right of your current line.
Accept suggestions with Tab, reject with Esc, or accept word-by-word using Ctrl+Arrow-Right. Keep typing or press Esc to hide suggestions.
Tab predicts your next editing location in the file and suggests jumps. After accepting an edit, press Tab again to jump to the next location.
Tab predicts context-aware edits across files. A portal window appears at the bottom when a cross-file jump is suggested.
In TypeScript and Python, Tab automatically adds import statements when missing. Use a method from another file and Tab suggests the import. Accepting adds it without disrupting your flow.
If auto-import isn’t working:
Tab works in Go to Definition or Go to Type Definition peek views. Useful for modifying function signatures and fixing call sites.
In Vim, use with gd
to jump to definitions, modify, and resolve references in one flow.
Accept one word at a time with Ctrl+Arrow-Right, or set your keybinding via editor.action.inlineSuggest.acceptNextWord
. Enable in: Cursor Settings
→ Tab
.
Setting | Description |
---|---|
Cursor Tab | Context-aware, multi-line suggestions around your cursor based on recent edits |
Partial Accepts | Accept the next word of a suggestion via Ctrl+Arrow-Right |
Suggestions While Commenting | Enable Tab inside comment blocks |
Whitespace-Only Suggestions | Allow edits affecting only formatting |
Imports | Enable auto-import for TypeScript |
Auto Import for Python (beta) | Enable auto-import for Python projects |
Use the status bar (bottom-right) to:
Tab gets in the way when writing comments, what can I do?
Disable Tab for comments by going to Cursor Settings
→ Tab Completion
and unchecking Trigger in comments.
Can I change the keyboard shortcut for Tab suggestions?
Remap accepting and rejecting suggestions to any key using Accept Cursor Tab Suggestions
in Keyboard Shortcuts
settings.
How does Tab generate suggestions?
Cursor includes a small part of relevant code in the context window. The context is encrypted and sent to our backend. The backend decrypts and securely reads the context. Then, the Cursor Tab model predicts a code suggestion, and returns it to the client to display in editor.