首页 > 其他 > 详细

sublime封装代码片段

时间:2016-07-13 02:18:52      阅读:247      评论:0      收藏:0      [点我收藏+]

1.sublime中tool---->new snippet

将需要复用的进行写在CDATA里,进行保存--->Data下的self(自己新建的)进行保存

?

2.<tabTrigger>hScript</tabTrigger>改成自定义名称

?

3.在引用的时候直接hScript+tab ? 即可加载出自定义的数据

?

<snippet>

<content><![CDATA[

<!-- Hello, ${1:this} is a ${2:snippet}. -->

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<title>Document</title>

<script type="text/javascript">

${1:this}?

</script>

</head>

<body>

${2:this}?

</body>

</html>

]]></content>

<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->

<tabTrigger>hScript</tabTrigger>

<!-- Optional: Set a scope to limit where the snippet will trigger -->

<!-- <scope>source.python</scope> -->

</snippet>

?

sublime封装代码片段

原文:http://yuzhouxiner.iteye.com/blog/2310534

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!