1.tool->new snippet(工具->新代码段) 创建一个新的snippet,并保存为author.sublime-snippet(最好在该目录(User)下再创建一个MySnippet目录):
其内容:
<snippet>
<content><![CDATA[
/**
* ============================
* @Author: XX
* @Version: 1.0
* @DateTime: ${1:ctrl+alt+shift+d}
* ============================
*/
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>author</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->

本文介绍了如何在Sublime Text 3中创建和设置snippet,以自动插入包含作者和日期的信息头。首先,通过工具菜单新建snippet并保存,接着创建一个插件用于插入当前日期。然后,需在用户按键绑定中设置触发插件的快捷键。完成这些步骤后,用户在文件中输入'author'并按Tab键,会弹出信息头,再使用设定的快捷键即可插入当前日期。
&spm=1001.2101.3001.5002&articleId=78732758&d=1&t=3&u=663fc3c145fc486cb1f9c4e9e4de1a15)
1454

被折叠的 条评论
为什么被折叠?



