Sublime Text 3 插件

By on 5-15-2014 in 代码

1.SublimeBookmark

a better bookmark system for SublimeText

demo gif

Ctrl+F2可以快捷的增加书签(不用自定义书签名称),按F2则可以快捷的在标签之间切换,很方便。

https://sublime.wbond.net/packages/Sublime%20Bookmarks

2.Emmet(原来大名鼎鼎的Zen Coding)

Emmet的定制比之前的Zen Coding稍微方便些,Zen Coding要翻很多目录找到zen_settings.js而Emmet只要在菜单里设置就行了。Preferences>Package Settings>Emmet

///////////////////////////////
	// Emmet customization
	// Each section has the same meaning as the same-named JSON file
	// described here:
	// http://docs.emmet.io/customization/
	///////////////////////////////
	// Custom snippets definitions, as per https://github.com/emmetio/emmet/blob/master/snippets.json
	"snippets": {
		// "html": {
		// 	"abbreviations": {
		// 		"example": "<div class="example" title="Custom element example">"
 // }
 // }
 },
 // Emmet preferences
 // List of all available preferences:
 // http://docs.emmet.io/customization/preferences/
 "preferences": {
 // "css.valueSeparator": ": ",
 // "css.propertyEnd": ";"
 },
 // Output profiles for syntaxes
 // http://docs.emmet.io/customization/syntax-profiles/
 "syntaxProfiles": {
 // Enable XHTML dialect for HTML syntax
 // "html": "xhtml"
 }

Setting-Default里面有示例的格式,将上面那一段拷贝到Setting-Users里面(注意最外层的大括号{}也要拷贝)就可以开始编辑了

{///////////////////////////////
	// Emmet customization
	// Each section has the same meaning as the same-named JSON file
	// described here:
	// http://docs.emmet.io/customization/
	///////////////////////////////
	// Custom snippets definitions, as per https://github.com/emmetio/emmet/blob/master/snippets.json
	"snippets": {
		"html": {
			"abbreviations": {
				"example": "<div class="example" title="Custom element example">",
				 //"q": "<?php echo \\$this->__(\'${child}|\') ?>"
				"ultit": "ul>li[title=$#]*>{$#}+img[alt=$#]",
				 	}
			 }
 },
 // Emmet preferences
 // List of all available preferences:
 // http://docs.emmet.io/customization/preferences/
 "preferences": {
 // "css.valueSeparator": ": ",
 // "css.propertyEnd": ";"
 },
 // Output profiles for syntaxes
 // http://docs.emmet.io/customization/syntax-profiles/
 "syntaxProfiles": {
 // Enable XHTML dialect for HTML syntax
 // "html": "xhtml"
 }
}

Emmet现在定制可以写一些比较常用的缩写,但是无法像以前Zen Coding那样用\\逃避$和|,所以一些比较有用的<?php echo \\$this->__(\'${child}|\') ?>定制代码现在无法使用了… 老老实实用Dreamweaver CS 5 + Zen Coding 然后Sublime + Emmet~

//快捷生成N张命名规律的wordpress图片代码,顺便加了下fancybox的组功能
a[rel=email][href=http://www.cnxusong.com/wp-content/uploads/2014/06/muli-email$.png]*7>img[src=http://www.cnxusong.com/wp-content/uploads/2014/06/muli-email$.png][alt=email]

http://qianduanblog.com/3233.html
http://salonglong.com/emmet-advanced.html

旧文一篇: Javascript 巧用 新文一篇: Magento Multi Language

One Comment

Loading ....
  1. 1

    czsaddoyvtpoh, blkqbhqtlv

亲~ 想说点儿什么不?