【发布时间】:2014-08-02 22:57:30
【问题描述】:
我按照 Microsoft 的演练创建了一个 VS 2013 sn-p。它是为我必须经常输入的一些 css 类属性添加一个快捷方式。
我将语言类型属性放在“html”,因为没有应用其他选项。
我将它们导入到 Code Snippets 文件夹中名为“Steve”的新文件夹中。
它们没有出现在我必须编辑的 .aspx 和 .ascx 文件中。如果我创建一个虚拟的.html 文件,它就可以工作。所以我认为语言设置需要改变。不过我用谷歌搜索了它,但找不到它应该是什么。
更新:如果可能的话,我还需要在 JS 文件中的 html 字符串中使用它。
这是 sn-p,原样:
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Button Default</Title>
<Author>Steve Lombardi</Author>
<Description>Add a design system default button class</Description>
<Shortcut>btnd</Shortcut>
</Header>
<Snippet>
<Code Language="HTML">
<![CDATA[class="btn btn-default" ]]>
</Code>
</Snippet>
【问题讨论】:
-
如果您能解决,能否分享一下解决方案?
标签: c# html visual-studio visual-studio-2013