Yasnippet
来源:互联网 发布:中国核武数量 知乎 编辑:程序博客网 时间:2024/06/03 18:42
SQL, LaTeX, HTML, CSS and more. The snippet syntax is inspired from TextMate's syntax, you can even import most TextMate templates to YASnippet
download https://github.com/capitaomorte/yasnippet
then put below to .emacs
;;YASnippet(add-to-list 'load-path "/home/ryu/emacs/site/yasnippet")(require 'yasnippet)(yas-global-mode 1)(yas--initialize)(yas/load-directory "/home/ryu/emacs/site/yasnippet/snippets")
How to Use Yasnippet?
Insert a template by using the menu.
Insert a template by typing the abbreviation, then press Tab.
Find Out What Templates Are Available
1: when coding HTML. YASnippet->html-mode->submenu -> 〖<body>…</body>〗 ->“body =>” it means type body -> press Tab -> it'll expand to <body> </body>.
2: folder /snippets/html-mode/-> a list of files.the first part before “.”, is the abbreviation you can use.
#name : is for a short title for the template.
# -- : Everything above that line is either comment or directive. Below the line is the actual template definition.
自定义模板
1:当在文件中,不指明key的话,文件名中不论有没有点号,都是作为一个整体作为标识。只要文件名不一样就是不同的模板,内容无视。
2:但是当你在文件中指定了key的话,只要内部name一样,它们就会互相覆盖。前提是name不一样,它才会展现出来,并且这个时候key作为标识。
Emacswiki http://emacswiki.org/Yasnippet
http://blog.waterlin.org/articles/emacs-yasnippet-basic-usage.html
Emacs: Using Templates with YASnippet
Emacs: How to Define Templates in YASnippet
- yasnippet
- Yasnippet
- emacs yasnippet cperl
- Yasnippet & html-helper-mode
- emacs下yasnippet小结
- emacs添加yasnippet插件
- auto-complete & cedet & ecb & yasnippet
- Emacs: How to Define Templates in YASnippet
- yasnippet模板中使用elisp语句
- Emacs高效的yasnippet 简单使用和定制
- yasnippet 0.7.0和auto-complete-mode一起使用
- emacs 24 IDE配置(YASnippet、ECB、Cedet、Auto-complete)
- emacs下C/C++自动补全,Yasnippet && auto-complete && auto-complete-clang-async
- emacs自动补全插件auto-complet和yasnippet,安装、配置和扩展
- emacs下C/C++自动补全 之 使用Yasnippet模板补全 以自定义USACO模板为例
- Microsoft.XMLHTTP“没有权限”的错误
- [android]区分Activity的四种启动模式---LaunchMode
- Skia引擎API skia_skcanvas 整理介绍
- SRAM和DRAM的区别
- 2012.9.1
- Yasnippet
- 同类似的方法可用intercepter取代
- 使用俩个栈实现一个队列的功能
- hdu1874 dijkstra模板题
- Linux--线程编程
- HDU 1394 Minimum Inversion Number
- android anim 动画效果
- 桥接模式和NAT模式
- Android学习(二) Eclipse使用