加载中…
正文 字体大小:

Sublime Package Control

(2012-04-23 21:11:53)
标签:

杂谈

分类: 杂谈

Installation

Installation is through the Sublime Text 2 console. This is accessed via the ctrl+` shortcut. Once open, paste the following command into the console:

import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ',' ')).read()); print 'Please restart Sublime Text to finish installation'


This command creates the Installed Packages folder for you (if necessary), and then downloads the Package Control.sublime-package into it.

Manual Instructions

If for some reason the console installation instructions do not work for you, perform the following steps to manually install Package Control:

1.  Click the Preferences > Browse Packages… menu entry

2.  Browse up a folder and then into the Installed Packages folder

3.  Download Package Control.sublime-package and copy it into the Installed Packages directory

4.  Restart Sublime Text

 

Settings

The default settings can be viewed by accessing the Preferences > Package Settings > Package Control > Settings – Default menu entry. To ensure settings are not lost when the package is upgraded, make sure all edits are saved to Settings – User.

submit_usage

If installs, upgrades and removals should be logged to the reporting URL. This data will be used to power the community package listing and will be displayed in aggregate only. No user-identifiable information is sent, just the: package name, operation, package version, package control version, sublime version and sublime platform.
Default: yes

submit_url

Where the usage information should be sent to.
Default: "http://sublime.wbond.net/submit"

installed_packages

A list of packages that have been installed. Package Control will automatically install any packages in this list that are not currently installed, allowing this to be used for sharing package lists with other users. This setting is only tracked in Settings – User.
Default: []

repository_channels

A list of URLs that each contain a JSON file with a list of repositories. The repositories from these channels are placed in order after the repositories from the repositories setting.
Default: ["http://sublime.wbond.net/repositories.json"]

repositories

A list of URLs that contain a packages JSON file. These repositories are placed in order before repositories from the repository_channelssetting.
Default: []

package_name_map

This helps solve naming issues where a repository it not named the same as the package should be. This is primarily only useful for GitHub and BitBucket repositories. This mapping will override the mapping that is retrieved from the repository channels.
Default: {}

auto_upgrade

If packages installed via Package Control should be checked for updates when Sublime Text starts. Updates will be automatically installed.
Default: true

auto_upgrade_frequency

The number of hours to wait before trying to auto upgrade packages again.
Default: 6

auto_upgrade_ignore

Packages to exclude from the auto upgrade functionality.
Default: []

timeout

The HTTP timeout (in seconds) to use when downloading channels, repositories and packages.
Default: 30

cache_length

The number of seconds to cache channel and repository metadata for.
Default: 300

http_proxy

The proxy to use for HTTP requests. This will override any system-wide proxy.
Default: ""

https_proxy

The proxy to use for HTTPS requests. If http_proxy is set and this settings is not, the value from http_proxy will be used. This will override any system-wide proxy.
Default: ""

git_binary

The path to git, when using a git repository to track a package. When an empty string, Package Control will look in default locations for the current OS.
Default: ""

git_update_command

The parameters passed to git to update a package.
Default: ["pull", "origin", "master"]

hg_binary

The path to hg, when using an hg repository to track a package. When an empty string, Package Control will look in default locations for the current OS.
Default: ""

hg_update_command

The parameters to pass to hg to update a package. Be sure to keep the remote name as the last parameter, even if it is default.
Default: ["pull", "--update", "default"]

dirs_to_ignore

A list of folders to ignore when creating a .sublime-package file.
Default: [".hg", ".git", ".svn", "_darcs", "CVS"]

files_to_ignore

A list of file glob patterns to ignore when creating a .sublime-package file.
Default: [".hgignore", ".gitignore", ".bzrignore", "*.pyc", "*.sublime-project", "*.tmTheme.cache"]

package_destination

The folder to copy a newly created package to. Default to the user’s Desktop if blank. Setting this destination to the Installed Packagesdirectory will cause your source code changes to be overwritten when Sublime Text restarts!
Default: ""

 

Packages

sftp

svn

tortoise

zendcoding

prefixr

vi,      “ignored_packages”:[]

IndentGuides

Alignment

阅读 评论 收藏 转载 喜欢 打印举报
已投稿到:
  • 评论加载中,请稍候...
发评论

       

    验证码: 请点击后输入验证码 收听验证码

    发评论

    以上网友发言只代表其个人观点,不代表新浪网的观点或立场。

      

    新浪BLOG意见反馈留言板 不良信息反馈 电话:4006900000 提示音后按1键(按当地市话标准计费) 欢迎批评指正

    新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 会员注册 | 产品答疑

    新浪公司 版权所有