·2 min read

Exploring Cursor: Accessing External Documentation using @Doc


This chapter is taken from my book, "AI Assisted Coding for iOS Development". You can buy it to learn further about Cursor:

Exploring AI Assisted Coding


Switching between tabs to check documentation breaks my flow. I am deep in the code, need a quick reference, and somehow lost in an endless search.

I was live-streaming with my friend Ray when he introduced me to this feature that Cursor index external documentation directly!

Cursor lets you add external documentation links directly to your workspace. You just provide a link, and Cursor indexes it. Then, you can use it right there by typing @Doc or mentioning the document's name.

Setting Up Docs in Cursor

During the live session, I decided to set up the AIProxy docs to see how well this feature worked. The link I used was for Replicate Swift examples:

AIProxy

PAIProxy logo

](https://www.aiproxy.pro/docs/swift-examples/replicate.html)

Here is how you do it:

  1. Open Cursor and go to Settings.
  2. Click on the "Features" tab, then select "Docs."
  3. Add the new documentation link, and let Cursor do its thing.

To make sure it is indexed, click on the index button again for the green dot prefixed by the name of the document:

Once it indexed the link, I could access that documentation anytime by using @Doc or directly typing out the name.

I wanted to see how smoothly it worked, so I opened the Composer and typed in @Doc to pull up the information from AIProxy. The response was instant!

Moving Forward

The @Doc feature reduced the friction of searching for information. It does keep me in the flow, letting me work without constant interruptions. I wonder how much of a difference it is when working with @Web vs @Doc but as long as it solves the problem quickly, it does not matter. If you frequently bounce between your editor and browser for a particular set of documentation, try setting up a few docs in Cursor

Happy Cursoring!

Post Topics

Explore more in these categories:

Related Articles

Exploring AI: Cosine Similarity for RAG using Accelerate and Swift

Learn how to implement cosine similarity using Accelerate framework for iOS and macOS apps. Build Retrieval-Augmented Generation (RAG) systems breaking down complex mathematics into simple explanations and practical Swift code examples. Optimize document search with vector similarity calculations.

Exploring Cursor: Autocompletion with Tab

Discover how to supercharge your iOS development workflow with Cursor, an AI-powered alternative to Xcode. Learn to leverage powerful autocompletion features, and integrate the Sweetpad extension.

Exploring Cursor: Browsing the Web for Resources using @Web

Discover how Cursor's @web command helps with coding workflow. While AI assistants like Claude 3.5 Sonnet can't browse the web, Cursor lets developers search online directly in their editor. From finding iOS 18 APIs to accessing SwiftUI documentation, stay focused and code efficiently.