[英]Visual Studio Code - Code Snippet cw Unexpected Behavior
When using code snippets in Visual Studio Code, the behavior of cw
which turns into Console.WriteLine()
always includes the fully qualified name when it is auto completed, as follows.在 Visual Studio Code 中使用代码片段时,转换为
Console.WriteLine()
的cw
的行为在自动完成时始终包含完全限定名称,如下所示。
System.Console.WriteLine()
However, I already have using System;
但是,我已经
using System;
declared at the top of my file.在我的文件顶部声明。 Why does
VSCODE
insist on including the namespace in the code snippet?为什么
VSCODE
坚持在代码片段中包含命名空间? I am expecting it to auto complete into this,我期待它自动完成,
Console.WriteLine()
Is this normal behavior to be expected from VSCODE
? VSCODE
会出现这种正常行为吗?
maybe you can create a snippet in VSC :也许您可以在 VSC 中创建一个片段:
{ "Print ConsoleWriteLine()": {
"prefix": "cw",
"body": [
"Console.WriteLine($0);"
],
"description": "Print line of code"
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.