015_sublime插件管理及所有非常有用插件

一、sublime如何更改自定义快捷键和录制macro

因为实际需求,需要更改默认的"删除到行位"的快捷键(默认为command+k),但距离太远,不好操作.

但死活找不到更改这个快捷键的设置,无意间看到官网sublime有录制macro的功能.

"ctrl+q"开始录制,然后"ctrl+k","ctrl+q"停止录制,它存储在"~/Library/Application Support/Sublime Text 3/Packages/User/DeleteFromCursorToEndofLine.sublime-macro",内容为:

[
	{
		"args":
		{
			"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"
		},
		"command": "run_macro_file"
	}
]

 后边就是表示"删除到行位"sublime的默认macro名称,于是"Sublime Text"->"Preferences"->"Key Bindings",输入以下内容即可(表示快捷键运行后边的macro文件即可):

[
	{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} }
]

 Reference:http://docs.sublimetext.info/en/latest/extensibility/macros.html?highlight=Delete%20Line.sublime-macro

二、

<1>按照这个进行Package Control的安装

https://packagecontrol.io/installation

import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

<2>packagecontrol官网

https://packagecontrol.io/browse/labels/theme

三、

(1)pretty json

参考:https://segmentfault.com/a/1190000006011018
<1>安装pretty json
cmd + shift +p
install package
pretty json

或者

cd /Users/xixicat/Library/Application Support/Sublime Text 3/Packages
git clone https://github.com/dzhibas/SublimePrettyJson.git
<2>格式化
ctrl+cmd+j

  

 

posted @ 2017-06-24 14:21  arun_yh  阅读(229)  评论(0编辑  收藏  举报