如何利用sublime Snippet高效编写长尾词?
- 内容介绍
- 文章标签
- 相关推荐
本文共计444个文字,预计阅读时间需要2分钟。
下面是简化后的内容:
由Sublime教程栏目为大家介绍Sublime Snippet如何编写!编写Sublime Snippet的步骤如下:
1.[CDATA[ + Hello, ${1:wuwuuwuwuwuwuwu} is a ${2:}. + ]] + /content
2.可选:设置tabTrigger来定义如何触发该片段。
下面由sublime教程栏目给大家介绍sublime Snippet如何编写!sublime Snippet编写
<snippet> <content><![CDATA[ Hello, ${1:wuwuuwuwuwuwuuwu} is a ${2}. ]]></content> <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> <!-- <tabTrigger>hello</tabTrigger> --> <tabTrigger>hello</tabTrigger> <!-- Optional: Set a scope to limit where the snippet will trigger --> <!-- <scope>source.python</scope> --> <scope>text.html</scope> <description>Hellossssssssssssssssssssssssssssssssssssssss My test.</description> </snippet>
snippet是片段的意思,就是说智能提示的概念。
content是片段内容,scope标签是触发的文件类型,tagTrigger是触发的关键字,description是注释说明
他和macro的区别是:
宏的操作都是需要用快捷键的,而且保存的宏必须加载在系统keymap文件user自定义部分当中。
eg:
对已经保存的宏的操作:
[ { "keys": ["ctrl+shift+;"], "command": "run_macro_file", "args": {"file": "res://Packages/User/test.sublime-macro"} } ]
而snippet操作是用于只能提示,只要文件保存了系统就会自动加载,不需要keymap。
但是,marco是对多个操作的统一规划,而snippet只是只能提示罢了。
也就是说当你需要一堆有顺序的按键操作的时候,使用marco,记录宏实际上就是记录你的按键顺序。
而当你想加载一个模板或者智能提示时,用snippet
效果如图所示
以上就是sublime Snippet如何编写的详细内容,更多请关注自由互联其它相关文章!
本文共计444个文字,预计阅读时间需要2分钟。
下面是简化后的内容:
由Sublime教程栏目为大家介绍Sublime Snippet如何编写!编写Sublime Snippet的步骤如下:
1.[CDATA[ + Hello, ${1:wuwuuwuwuwuwuwu} is a ${2:}. + ]] + /content
2.可选:设置tabTrigger来定义如何触发该片段。
下面由sublime教程栏目给大家介绍sublime Snippet如何编写!sublime Snippet编写
<snippet> <content><![CDATA[ Hello, ${1:wuwuuwuwuwuwuuwu} is a ${2}. ]]></content> <!-- Optional: Set a tabTrigger to define how to trigger the snippet --> <!-- <tabTrigger>hello</tabTrigger> --> <tabTrigger>hello</tabTrigger> <!-- Optional: Set a scope to limit where the snippet will trigger --> <!-- <scope>source.python</scope> --> <scope>text.html</scope> <description>Hellossssssssssssssssssssssssssssssssssssssss My test.</description> </snippet>
snippet是片段的意思,就是说智能提示的概念。
content是片段内容,scope标签是触发的文件类型,tagTrigger是触发的关键字,description是注释说明
他和macro的区别是:
宏的操作都是需要用快捷键的,而且保存的宏必须加载在系统keymap文件user自定义部分当中。
eg:
对已经保存的宏的操作:
[ { "keys": ["ctrl+shift+;"], "command": "run_macro_file", "args": {"file": "res://Packages/User/test.sublime-macro"} } ]
而snippet操作是用于只能提示,只要文件保存了系统就会自动加载,不需要keymap。
但是,marco是对多个操作的统一规划,而snippet只是只能提示罢了。
也就是说当你需要一堆有顺序的按键操作的时候,使用marco,记录宏实际上就是记录你的按键顺序。
而当你想加载一个模板或者智能提示时,用snippet
效果如图所示
以上就是sublime Snippet如何编写的详细内容,更多请关注自由互联其它相关文章!

