Skip to main content
 首页 » 编程设计

python之Intellij IDEA 中的 Quick documentation 和 Autopopup documentation 有什么区别

2025年02月15日31yyy_WW

在我的 Intellij IDEA Ultimate 2017.1 中,我发现了两个类似的选项:

  • 显示鼠标移动的快速文档
  • 自动弹出文档

让我们本地化它们:

  • 文件 → 设置 → 编辑器 → 常规 → 常规 → 显示鼠标移动的快速文档

我在 Viewing Inline Documentation 中看到:

Quick Documentation Lookup helps you get quick information for any symbol or just method signature information, provided that this symbol has been supplied with documentation comments in the applicable format.

然后:

You can configure IntelliJ IDEA to automatically invoke the suggestions list, without having to call basic completion explicitly. To do this, in the main menu select File | Settings (or press Ctrl+Alt+S), on the left choose Editor | General | Code Completion, and select the Autopopup code completion option.

  • 文件 → 设置 → 编辑器 → 常规 → 代码完成 → 自动弹出文档(用于显式调用完成)。

在 Auto-Completing Code 中提到:

Basic code completion helps you complete names of classes, methods, fields, and keywords within the visibility scope. When you invoke code completion, IntelliJ IDEA analyses the context and suggests the choices that are reachable from the current caret position.


第一个在鼠标移动到给定文本上方时显示。第二个显示在 Ctrl+Space 上,如 Intellij IDEA show javadoc automatically 所示。 .

但是,当我在我的 Python 项目上正常工作时,我看不出它们之间的区别,例如,如果我定义了我自己的类 Foo 并且我要么按 Ctrl+ Space 或 Ctrl+Q 来自 f = Foo() 的 Foo。

请您参考如下方法:

快速文档和自动弹出文档之间没有区别,它们是使用不同方式调用的相同功能as described in this answer .