我想知道你们中是否有人知道一种在Visual Studio中启用以下功能(隐藏设置或扩展名)的方法:
I would like to know if any of you guys know a way to enable the following feature on Visual Studio (either a hidden setting or an extension):
我习惯于在Visual Studio上进行JavaScript开发,如果输入以下内容: "if" ,它向我显示了一个弹出窗口("if语句的代码段").按ENTER,添加以下内容:
I'm used to javascript development on Visual Studio where if I type: "if" on the text editor, it shows me a popup ("code snippet for an if statement"). Pressing ENTER the following is added:
if (true) { }这不适用于打字稿文件!
This is not available for typescript files!
这些摘录非常有用,这只是一个简单的示例
These snippets are really useful and this is just a simple example
我缺少的另一个基本功能是括号自动完成" .
Another basic feature I'm missing is "braces auto completion".
我不确定是否有启用它的方法,但确实希望这些基本功能可用.
I am not sure if there is a way to enable it or not, but really would like these basic features available.
这也适用于新发布的Visual Studio2015.另一方面,Visual Studio Code似乎可以很好地处理它.
This also applies for the newly released Visual Studio 2015. On the other hand, Visual Studio Code seems to handle it very well.
推荐答案Github上存在一个问题,即能够在Typescript文件中使用Javascript代码片段,并使代码段代码管理器能够将Typescript识别为一种语言. github/Microsoft/TypeScript/issues/312
There is an issue on Github about being able to use Javascript snippets in Typescript files, and to make the Snippet Code Manager being able to recognize Typescript as a Language. github/Microsoft/TypeScript/issues/312
更多推荐
Visual Studio上的打字稿片段
发布评论