`
三月沙
  • 浏览: 620025 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

程序员利器sublime text 插件安装

 
阅读更多

sublime text 已经使用了有一年多了,随着其插件越来越丰富,现在平时工作生活所有代码都可以在sublime 上完成,而且其本身是跨平台的。

 

sublime 的插件安装非常方便,安装教程和地址如下

http://wbond.net/sublime_packages/package_control/installation

 

项目托管地址

https://github.com/wbond/sublime_package_control

 

Installation

Get Package Control alpha for Sublime Text 3

Please note that the following method can not validate the sublime.wbond.net SSL certificate. If you have concern over the security of the download, please follow the Manual Instructions below.

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(' ','%20')).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-packageinto it.

Start Managing Your Packages

Manual Instructions

If for some reason the console installation instructions do not work for you (such as having a proxy on your network), 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

Testing Version

If you want to help test the latest changes, or you are having trouble with the stable version (v1.6.3) of Package Control, please use the instructions below to install the testing version (v1.6.9.0). See the testing version changelog on GitHub.

Notable changes include:

  • Refactoring in prep to support Python 3 for Sublime Text 3.

Upgrade

If you already have Package Control installed and want to help test the new version.

  1. Run the Package Control: Add Repository command via the command palette and enter the following URL:
    https://sublime.wbond.net/testing/packages.json
  2. Run the Package Control: Upgrade Package command and select Package Control from the list

Manual Install

If Package Control is not currently working for you, you’ll have to manually install.

  1. Click the Preferences > Browse Packages… menu entry
  2. Browse up a folder and then into the Installed Packages folder
  3. Download the testing version of Package Control.sublime-package and copy it into the Installed Packages directory
  4. Restart Sublime Text
  5. Run the Package Control: Add Repository command via the command palette and enter the URL to keep the testing version of Package Control up-to-date:
    https://sublime.wbond.net/testing/packages.json

Sublime Text 3

There is an alpha quality release of Package Control for Sublime Text 3 available. Please note that it currently functions the same as for ST2, however there will be changes in the future to properly support the new preferred method of keeping .sublime-package files on disk instead of extracting them to the Packages/ folder.

Please use GitHub issues and prefix all bug titles with ST3: .

Git Install

Since Sublime Text 3 no longer extracts the contents of .sublime-package files by default, and the fact that Package Control needs to read CA cert files from disk for SSL certificate verification, the only viable install method right now is via Git.

Please note, the Packages/ folder listed below refers to the folder that opens when you use the Preferences > Browse Packages… menu.

cd Packages/
git clone https://github.com/wbond/sublime_package_control.git "Package Control"
cd "Package Control"
git checkout python3

Testing on Sublime Text 2

The new version of Package Control is targetted at both Sublime Text 2 and Sublime Text 3. If you are still running ST2, and can help, please spend some time testing to make sure it does not regress.

  1. Run the Package Control: Add Repository command via the command palette and enter the following URL:
    https://sublime.wbond.net/alpha/packages.json
  2. Run the Package Control: Upgrade Package command and select Package Control from the list
 

Usage

Package Control is driven by the Command Pallete. To open the pallete, press ctrl+shift+p (Windows, Linux) or cmd+shift+p (OS X). All Package Control commands begin with Package Control:, so start by typing Package.

The command pallete will now show a number of commands. Most users will be interested in the following:

Install Package
Show a list of all available packages that are available for install. This will include all of the packages from the default channel, plus any from repositories you have added.
Add Repository
Add a repository that is not included in the default channel. This allows users to install and automatically update packages from GitHub and BitBucket. To add a package hosted on GitHub, enter the URL in the form https://github.com/username/repo. Don’t include .git at the end! BitBucket repositories should use the format https://bitbucket.org/username/repository.
Remove Package
This removes the package folder, and the package name from the installed_packages list in Packages/User/Package Control.sublime-settings. The installed_packages list allow Package Control to automatically install packages for you if you copy yourPackages/User/ folder to another machine.

By default Package Control checks for new versions on startup. This setting, plus the list of channels and repositories are managed through the Settings.

Additional commands include:

Add Repository Channel
Adds another channel that lists repositories. This is uncommon, but allows users to create a custom channel of repositories to share.
Create Package File
For package developers. Takes a package folder and generates a .sublime-package file that can be uploaded onto the web and referenced in the packages.json file for a repository.
Create Binary Package File
For package developers. Creates a .sublime-package file that does not include the source .py files, but instead the .pycbytecode files. This is useful to distribute commercial packages. Be sure to check the resulting .sublime-package file to ensure that at least one .py file is included so that Sublime Text will load the package.
Disable Package
Disables a package, which causes any Python scripts to be unloaded, and other files such as .sublime-keymap files to be unloaded also.
Discover Packages
Opens up a web browser to the Community Packages list.
Enable Package
Re-enables a package that has been disabled.
Upgrade/Overwrite All Packages
This will upgrade ALL packages, including ones that were not installed via Package Control. If you are developing a custom copy of a package, you may not want to use this command.
Upgrade Package
Show a list of packages that are available for upgrade and let the user pick which they would like to update.
Package Control Settings – Default
Open the default settings file, which can be used as a reference for changing the User settings. Any changes to this file will be lost whenever Package Control is automatically or manually upgraded.
Package Control Settings – User
Opens the user’s settings for Package Control. Any settings changes should be saved here so they are not overwritten when a new version of Package Control is released.
 

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.

debug
If set to true, will print HTTP headers and other debug information to the Sublime Text console.
Default: false
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 therepository_channels setting.
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: []
install_missing
If set to false, will not automatically install packages from the installed_packages setting that are not present on the current machine. This is really only useful if you don’t want Sublime Text to connect to the internet without explicitly requesting it. In that case you’ll want to set auto_upgrade to false also.
Default: true
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. Should be in the form domainname:port or ip:port.
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. If set to false, then http_proxy will not be inherited. Should be in the form domainname:port or ip:port.
Default: ""
proxy_username
The username to use for proxy authentication. Default: ""
proxy_password
The password to use for proxy authentication. Default: ""
user_agent
The user agent used by the various downloaders. Default: "Sublime Package Control"
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"]
ignore_vcs_packages
If git and hg repositories should be ignored when trying to update packages.
Default: false
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 Packages directory will cause your source code changes to be overwritten when Sublime Text restarts!
Default: ""
certs

A list of CA cert information for the purpose of providing a secure way to download packages. A default list is provided with Package Control, but then the default repository channel provides updates to the list. It is also possible to add your own entries for custom download locations, or for supporting your local proxy server.

To add your own, be sure to copy the JSON object below and then add your custom entries. The key in the JSON object is the domain the cert applies to. The value is an array with two elements, the first being an identifier for the cert, and the second being a location to copy the cert from. The identifier is used to ensure that Package Control has a copy of the latest version of the cert in its certs/ folder. The location can be either an absolute file path on your local machine, or a URL to download it from.

To create a CA cert that is ensured to be present no matter what domain is being accessed (such as for a proxy server), set the domain name to *, like in the example on the next line:

"*": ["my_proxy_cert", "/file/path/to/proxy/ca_certs"]

This ca cert needs to live somewhere on your machine permanently so that it can be re-added to the ca-bundle.crt file that is provided with each Package Control upgrade.

Default:
{
    "api.bitbucket.org": ["d867a7b2aecc46f9c31afc4f2f50de05", ""],
    "api.github.com": ["1c5282418e2cb4989cd6beddcdbab0b5", ""],
    "bitbucket.org": ["897abe0b41fd2f64e9e2e351cbc36d76", ""],
    "nodeload.github.com": ["1c5282418e2cb4989cd6beddcdbab0b5", ""],
    "raw.github.com": ["1c5282418e2cb4989cd6beddcdbab0b5", ""],
    "sublime.wbond.net": ["7f4f8622b4fd001c7f648e09aae7edaa", ""]
}
分享到:
评论

相关推荐

    Sublime Text3 最新版本SFTP插件等

    至于压缩包中的“Sublime Text”文件,很可能包含了安装或更新Sublime Text3以及SFTP插件所需的文件和步骤。用户通常需要按照官方指南或社区提供的教程来解压并安装这些文件,确保Sublime Text3能正确配置并运行SFTP...

    Sublime Text 3x64绿色免安装

    Sublime Text 3x64是一款广受欢迎的文本编辑器,尤其受到程序员和开发者们的青睐。这款64位版本的Sublime Text具有轻量级、高效且高度可定制的特性,无需安装,直接解压即可使用,大大简化了用户的操作流程。 首先...

    微信小程序使用sublime text插件开发详细教程weapp-snippet-for-sublime-text-2-3-master.zip

    微信小程序是一种轻量级的应用开发框架,由腾讯公司推出,主要应用于移动端,为开发者提供便捷的前端开发环境。Sublime Text是一款广受欢迎的代码...总之,这个插件是微信小程序开发者在Sublime Text中不可或缺的利器。

    SublimeText3207.zip

    Sublime Text 3的插件生态丰富多样,如Package Control插件管理器,它可以安装和管理各种第三方插件来扩展编辑器的功能。例如,Emmet插件能加速HTML和CSS编写,GitGutter则可显示与上次提交相比的代码变动。这些插件...

    Sublime Text 3083

    总的来说,Sublime Text 3083 提供了一套全面且强大的文本编辑解决方案,结合了汉化、注册码和插件包,使得中国用户能够更加便捷地利用这一开发利器。对于那些寻求高效编程环境的开发者而言,这是一个不容错过的工具...

    sublimeText 3103 纯净版(win 64位)

    Package Control 是Sublime Text中必不可少的一个组件,它允许用户方便地安装、管理和更新各种插件。通过Package Control,开发者可以快速提升Sublime Text的功能,如增强语法高亮、代码自动完成、文件搜索和项目...

    SublimeText_pretty

    Sublime Text是一款备受开发者喜爱的轻量级、高效且可高度自定义的代码编辑器,被誉为"SublimeText_pretty"。它以其简洁的界面、强大的功能和出色的性能,在编程社区中广受赞誉。这款编辑器支持多种编程语言,几乎...

    Sublime Text3 64位最新版本-含ftp插件-SVN插件.rar

    通过在Sublime Text3中安装如"Sublime SVN"这样的插件,开发者可以方便地进行版本控制操作,如提交、更新、查看差异、合并等,无需离开编辑器界面,增强了开发流程的流畅性。 代码格式化功能是Sublime Text3的另一...

    SublimeText3free.zip

    Sublime Text 3 是一款备受开发者喜爱的跨平台文本编辑器,尤其在Mac操作系统上...对于开发者而言,Sublime Text 3 是一款不可或缺的利器,而 "SublimeText3free.zip" 压缩包则为Mac用户提供了一条简单快捷的安装路径。

    SublimeText4下载

    此外,通过安装插件如SublimeCodeIntel,可以进一步增强代码补全功能。 4. **多光标编辑**:该编辑器允许在文档中同时设置多个光标,实现多行编辑,这对于批量修改代码或进行复杂操作非常方便。 5. **分割编辑**:...

    Python开发工具 Sublime Text3_64位

    总之,Sublime Text3作为Python开发的利器,以其丰富的插件、高度可定制性和高效的代码编辑功能,深受程序员喜爱。通过合理配置和使用,开发者可以在大数据、云计算和人工智能的复杂项目中游刃有余,提高工作效率。

    Sublime Text 2 Build 2139 Setup

    安装完成后,用户可以根据个人喜好和需求配置Sublime Text 2,包括调整主题、设置快捷键、安装插件等。 总之,Sublime Text 2 Build 2139 是一款强大的代码编辑工具,深受开发多年的经验丰富的工程师们推崇。其高效...

    SublimeText3 3083

    Sublime Text 3083 是一款广受欢迎的文本编辑器,专为程序员和开发者设计。这个版本(Build 3083)是Sublime Text 3的一个更新,提供了更稳定的功能和性能优化。Sublime Text以其高效、轻量级和高度可定制性而闻名,...

    Sublime Text神级代码编辑器 v3.3版

    "sublime_plugin.py"是Sublime Text插件系统的核心文件,它定义了插件的基本结构和接口,开发者可以基于此创建自定义工具和扩展。"msvcr100.dll"是Microsoft Visual C++运行时库的一部分,许多用C++编译的程序,包括...

    Sublime Text 2.0-注册版

    6. **插件系统**:Sublime Text拥有丰富的插件库,可以通过Package Control安装,如Git集成、侧边栏增强、Emmet等,扩展其功能。 7. **自定义配置**:几乎所有的界面和操作都可以自定义,包括键盘快捷键、颜色主题...

    Sublime2-已集成常用插件

    同时,Sublime Text 2的性能优化使得它在处理大型项目时也能保持流畅,不愧是程序员手中的利器。 在实际使用时,用户可以根据个人需求进一步调整和添加插件,以构建出最适合自己的开发环境。而这个预装了常用插件的...

    Cypher sublime插件

    Sublime Text是一款广受欢迎的文本编辑器,以其高效、可定制化和丰富的插件生态系统而受到程序员的青睐。`Cypher sublime` 插件就是为了在Sublime Text中提供对Cypher查询语言的良好支持,帮助开发者更方便地编写、...

    sublime_package.zip

    其次,"Package Control"是Sublime Text的一个核心组件,它是管理和安装Sublime Text插件的利器。安装了Package Control后,用户可以通过简单的命令行界面,方便地查找、安装、更新和卸载各种插件,极大地扩展了...

    SublimeText3

    Sublime Text 3是一款备受程序员喜爱的文本编辑器,它以其高效、易用和高度可定制性而闻名。这款软件支持编写多种编程语言,包括但不限于HTML、CSS、JavaScript、Python、PHP、C++等,几乎涵盖了所有主流的编程和...

    Sublime Test 3 Package Control

    **Sublime Text 3 Package Control** 是一个强大的插件管理工具,它为Sublime Text 3这个流行的文本编辑器提供了方便快捷的插件安装、更新和管理功能。Package Control是Sublime Text生态系统的重要组成部分,极大地...

Global site tag (gtag.js) - Google Analytics