我习惯于在.html
文件中进行 zen 编码,它可以工作!但是我不知道当我在文件中时如何做同样的事情,也.php
尝试过ctrl++但什么也没发生。我在一个 Joomla 网站上工作,所以主题文件会在里面而不是在里面,但是有很多 HTML 标签要输入。我什至尝试添加此设置并将其保存在用户文件夹中,但没有任何反应。为什么它不起作用?这是我从链接获得参考的地方,但是它在 Zen Coding.js 中使用,但即使在 ST2 中语法也是相同的。片段只是附加设置,但主要是 HTML zen-coding 缩写不会出现在文件中,但它可以在. 任何人都可以解决这个问题?altenter.php
.html
zen-coding.sublime.settings
.php
.html
"my_zen_settings" : {
"html": {
"filters": "php,html",
"abbreviations": {
"jq": "<script src='jquery.js' type='javascript'>",
"demo": "<div id=\"demo\"></div>"
}
},
"css": {
"filters": "html,css,fc",
"snippets": {
"c": "color:#${1:000000};"
}
},
"php": {
"filters": "php,html",
"snippets": {
"php": "<?php | ?>",
"php:info": "<?php\nphpinfo();\n?>",
"php:echo": "<?php echo | ?>",
"php:Ns": "<?php\nnamespace |;\n\t\n?>",
"php:ns": "namespace |;",
"php:Class": "<?php\nclass |\n{\n\t\n}\n?>",
"php:class": "class |\n{\n\t\n}",
"php:Function": "<?php\nfunction |() {\n\t\n}\n?>",
"php:function": "function |() {\n\t\n}",
"php:Var": "<?php $| = ; ?>",
"php:var": "$| = ;",
"php:Object": "<?php $| = (object) ; ?>",
"php:object": "$| = (object) ;",
"php:New": "<?php $| = new ; ?>",
"php:new": "$| = new ;",
"php:Bool": "<?php $| = FALSE; ?>",
"php:bool": "$| = FALSE;",
"php:Array": "<?php $| = array(); ?>",
"php:array": "$| = array();",
"php:Array+": "<?php |[] = ; ?>",
"php:array+": "|[] = ;",
"php:Array-": "<?php unset($|[]); ?>",
"php:array-": "unset($|[]);",
//hack $|, seems to replace $i with $1
"php:For": "<?php\nfor ($|i = 0; $|i < |; $|i++) {\n\t\n}\n?>",
"php:for": "for ($|i = 0; $|i < |; $|i++) {\n\t\n}",
"php:Foreach": "<?php\nforeach (| as ) {\n\t\n}\n?>",
"php:foreach": "foreach (| as ) {\n\t\n}",
"php:While": "<?php\nwhile(|) {\n\t\n}\n?>",
"php:while": "while(|) {\n\t\n}",
"php:Dowhile": "<?php\ndo {\n\t\n} while(|);\n?>",
"php:dowhile": "do {\n\t\n} while(|);",
"php:If": "<?php if( | ) { ?>\n\t\n<?php }?>",
"php:if": "if( | ) {\n\t\n}",
"php:Ifelse": "<?php if( | ) { ?>\n\t\n<?php } else { ?>\n\t\n<?php }?>",
"php:ifelse": "if( | ) {\n\t\n} else {\n\t\n}",
"php:Switch": "<?php switch( | ) { \n\tcase :\n\t\t\n\t\tbreak;\n\tdefault :\n\t\t\n\t\tbreak;\n}\n?>",
"php:switch": "switch( | ) { \n\tcase :\n\t\t\n\t\tbreak;\n\tdefault :\n\t\t\n\t\tbreak;\n}",
"php:Include": "<?php include \"|\"; ?>",
"php:include": "include \"|\";",
"php:Include1": "<?php include_once \"|\"; ?>",
"php:include1": "include_once \"|\";"
}
}
}