简体   繁体   English

我怎样才能摆脱烦人的“import pdb; pdb.set_trace()”关于 Visual Studio Code Intellisense 的自动完成建议

[英]How can I get rid of annoying “import pdb; pdb.set_trace()” autocomplete suggestion on Visual Studio Code Intellisense

Most of the time, Intellisense on VSC is really convenient, pressing 'enter' to autocomplete variables, functions etc. So I don't want to get rid of it completely.大多数时候,VSC 上的 Intellisense 非常方便,按“回车”可以自动完成变量、函数等。所以我不想完全摆脱它。

But I find it INCREDIBLY jarring when I'm closing parentheses, pressing enter, and the autocomplete always suggests and enters one of these two useless snippets of codes:但是当我关闭括号,按回车时,我发现它令人难以置信地震动,并且自动完成总是建议并输入这两个无用的代码片段之一:

import pdb; pdb.set_trace()

(the same thing happens here trying to import pandas as pd) (同样的事情发生在这里尝试导入 pandas 作为 pd)

or或者

root = tk.Tk()

I want to keep autocomplete upon pressing enter ON for things like variables and function suggestions, and preferably remove the above from the suggestions altogether if possible.对于变量和 function 建议等内容,我想在按 Enter ON 时保持自动完成,如果可能的话,最好从建议中完全删除上述内容。 Is there a way to do this?有没有办法做到这一点?

If it is a code snippet that gets applied here, you can use the editor.snippetSuggestions in your settings and set it to none if you want to hide snippets from intellisense.如果它是在此处应用的代码片段,您可以在设置中使用editor.snippetSuggestions ,如果您想对智能感知隐藏片段,则可以将其设置为none

You can also modify the sorting of the suggestions though if it helps in your specific usecase.如果它对您的特定用例有帮助,您也可以修改建议的排序。 more details can be found here: https://code.visualstudio.com/docs/editor/intellisense#_snippets-in-suggestions更多细节可以在这里找到: https://code.visualstudio.com/docs/editor/intellisense#_snippets-in-suggestions

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM