Cursor Documentation
  1. Tab
Cursor Documentation
  • Get Started
    • Introduction
    • Installation
    • FAQ
  • Guides
    • Editor Migration
      • Migrate from VS Code
      • Migrate from JetBrains IDEs
    • Languages & Frameworks
      • JavaScript & TypeScript
      • iOS & macOS (Swift)
      • Java
  • Editor
    • AI Commit Message
    • Notepads (Beta)
    • Keyboard Shortcuts
    • Tab
      • Overview
      • Tab vs GitHub Copilot
      • Auto-import
      • Advanced Features
    • Chat
      • Overview
      • Agent mode
      • Ask mode
      • Custom modes
      • Tools
      • Apply
    • ⌘K
      • Overview
      • Terminal Cmd K
  • Context
    • Codebase Indexing
    • Rules for AI
    • Ignore Files
    • Model Context Protocol
    • @ Symbols
      • Overview
      • @Files
      • @Folders
      • @Code
      • @Docs
      • @Git
      • @Web
      • @Definitions
      • @Link
      • @Lint Errors
      • @Lint Errors
      • @Recent Changes
      • @Cursor Rules
      • @Notepads
      • @Summarized Composers
      • #Files
      • /command
  • Account
    • Plans & Usage
    • Dashboard
    • Billing
    • Business
      • Get Started
      • Members + Roles
      • Analytics
      • SSO
  • Settings
    • Models
    • Custom API Keys
    • Early Access Program
  • Troubleshooting
    • Common Issues
    • Troubleshooting Guide
    • Getting a Request ID
  1. Tab

Auto-import

Auto-import feature in Tab helps add module imports automatically in TypeScript and Python projects

Overview#

In TypeScript and Python (beta) project, Tab can automatically import modules and functions from elsewhere in your project, without you having to manually type the import statement.
Just start using the method you want from an existing file, and Tab will automatically suggest the import statement for you. If you accept, the import statement will be added to your file without pulling you away from the code you are writing.

Troubleshooting#

If you are having issues with auto-import, please confirm you have the necessary extensions (e.g. a language server) for your project language, as this is required for auto-import to work.
You can confirm if this is working, by moving your cursor to a function or method that is not yet imported, and hit ⌘ + . or Ctrl + . to see if the import is suggested in the Quick Fix suggestions - if not, then the language server is not working.
Modified at 2025-03-26 08:19:40
Previous
Tab vs GitHub Copilot
Next
Advanced Features
Built with