Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
HTML的Atom代码段不';跑不动_Html_Windows_Atom Editor - Fatal编程技术网

HTML的Atom代码段不';跑不动

HTML的Atom代码段不';跑不动,html,windows,atom-editor,Html,Windows,Atom Editor,在我的atom文本编辑器for windows中,snippets.cson文件中有一个html片段,它不会给我任何错误,但当我打开index.html文件并开始键入前缀时,不会出现任何错误 我的期望是,我应该键入,然后看到开始页面片段弹出,点击tab将自动生成我的页面模板 我做错了什么,现在什么都没发生 # Snippet for opening a new html page 'text.html.basic': 'start page': 'prefix': '&

在我的atom文本编辑器for windows中,
snippets.cson
文件中有一个html片段,它不会给我任何错误,但当我打开
index.html
文件并开始键入前缀时,不会出现任何错误

我的期望是,我应该键入
,然后看到开始页面片段弹出,点击tab将自动生成我的页面模板

我做错了什么,现在什么都没发生

# Snippet for opening a new html page
 'text.html.basic':
    'start page':
        'prefix': '<!DOC'
        'body': """
            <!DOCTYPE html>
            <html>
                <head>
                    <title></title>
                    <link rel='stylesheet' type = 'text/css' href='css/' />
                </head>
                <body>
                    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
                               integrity="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="
                               crossorigin="anonymous"></script>
                    <script src = 'javascript/'></script>
                </body>
             </html>
                """
#用于打开新html页面的代码片段
'text.html.basic':
“起始页”:

“prefix”:“如果希望代码段与应该使用的
.html
文件相关

.text.html.basic
在第一行(和不是
.html

根据评论更新

请注意,不能在前缀中使用
。您可以将前缀更改为
DOC
,它将起作用


更改后是否重新启动了Atom?是的,只是做了相同的事情我找到了答案,在这里我不能在前缀中添加
,它不会抛出错误,但不起作用。将我的前缀更改为
DOC
可以正常工作。请修改您的答案,以反映这一点,以便我可以给您适当的信用,您做了一半修正:-)