以下是关于 Cursor 长文档处理的相关信息:
UI 用户界面:
切换: 要打开或关闭该功能,请将鼠标悬停在应用程序右下角状态栏上的“光标选项卡”图标上。
@Docs:
@Files:
When Cursor is only adding additional text,completions will appear as grey text.If a suggestion modifies existing code,it will appear as a diff popup to the right of your current line.当Cursor仅添加其他文本时,补全将显示为灰色文本。如果建议修改了现有代码,它将在当前行的右侧显示为diff弹出窗口。You can accept a suggestion by pressing Tab,or reject it by pressing Esc.To partially accept a suggestion word-by-word,press Ctrl/⌘→.To reject a suggestion,just keep typing,or use Escape to cancel/hide the suggestion.您可以通过按Tab键接受建议,也可以通过按Esc键拒绝建议。要逐字部分接受建议,请按Ctrl/⌘→。要拒绝建议,只需继续输入,或使用Escape取消/隐藏建议。Every keystroke or cursor movement,Cursor will attempt to make a suggestion based on your recent changes.However,Cursor will not always show a suggestion;sometimes the model has predicted that there’s no change to be made.每次击键或光标移动时,Cursor都会尝试根据您最近的更改提出建议。但是,Cursor不会始终显示建议;有时,模型预测不会做出任何更改。Cursor can make changes from one line above to two lines below your current line.Cursor可以从当前行上方的一行更改为当前行下方的两行。[heading3][heading3]Toggling切换[content]To turn the feature on or off,hover over“Cursor Tab”icon on the status bar in the bottom right of the application.要打开或关闭该功能,请将鼠标悬停在应用程序右下角状态栏上的“光标选项卡”图标上。
Cursor comes with a set of third party docs crawled,indexed,and ready to be used as context.You can access them by using the@Docs symbol.Cursor附带一组第三方文档,这些文档已爬取、索引并准备好用作上下文。您可以使用@Docs符号访问它们。[heading3][heading3]Add Custom Docs添加自定义文档[content]If you want to crawl and index custom docs that are not already provided,you can do so by@Docs>Add new doc.The following modal will appear after you’ve pasted in the URL of your desired doc:如果要对尚未提供的自定义文档进行爬网和索引,可以通过@Docs>Add new doc来实现。粘贴所需文档的URL后,将显示以下模式:Cursor will then index and learn the doc,and you will be able to use it as context like any other doc.然后Cursor将索引并学习文档,您将能够像任何其他文档一样将其用作上下文。[heading3][heading3]Manage Custom Docs管理自定义文档[content]Under Cursor Settings>Features>Docs,you will see the docs you have added.You can edit,delete,or add new docs here.在Cursor Settings>Features>Docs下,您将看到已添加的文档。您可以在此处编辑、删除或添加新文档。
In AI input boxes such as in Cursor Chat and Cmd K,you can reference entire files by using@Files.Also,if you continue to type after@,you will see your file search results after the[@Code](https://docs.cursor.com/context/@-symbols/@-code)strategy.在AI输入框中(如Cursor Chat和Cmd K),可以使用@Files引用整个文件。此外,如果您继续在@后键入,您将在[@Code](https://docs.cursor.com/context/@-symbols/@-code)策略之后看到您的文件搜索结果。In order to make sure the file you’re referencing is the correct file,Cursor will show a preview of the file’s path.This is especially useful when you have multiple files with the same name in different folders.为了确保您引用的文件是正确的文件,Cursor将显示文件路径的预览。当您在不同的文件夹中有多个同名文件时,这尤其有用。[heading3][heading3]Chat Long File References聊天长文件引用[content]In Cursor’s Chat,if the contents of a file is too long,Cursor will chunk the file into smaller chunks and rerank them based on relevance to the query.在Cursor的聊天中,如果文件的内容太长,Cursor会将文件分块为较小的块,并根据与查询的相关性对它们进行重新排序。[heading3]