読者です 読者をやめる 読者になる 読者になる

Capelin

情報系でメタルとオーディオ

Sublime Text 3 のPackage Control アップグレード

ソフトウェア

Sublime Text 3 を起動すると以下のメッセージが表示されるようになった。

Package Control Messages
========================

Package Control:

                            • -

Version 3.0 Release Notes


**** Windows Sublime Text 3 Users ****

Due to a bug in Package Control 2.0, Windows ST3 users will need to open the
Sublime Text console (ctrl+`) and execute the following Python to properly
upgrade. All other users may ignore this part of the message.

Make sure NOT to copy the leading two spaces, or an "unexpected indent" error
will occur.

import urllib.request,os; pr='Preferences.sublime-settings'; ip='ignored_packages'; n='Package Control'; s=sublime.load_settings(pr); ig=s.get(ip); ig.append(n); s.set(ip,ig); sublime.save_settings('Preferences.sublime-settings'); pf=n+'.sublime-package'; urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler())); by=urllib.request.urlopen('https://packagecontrol.io/'+pf.replace(' ','%20')).read(); open(os.path.join(sublime.installed_packages_path(),pf),'wb').write(by); ig.remove(n); s.set(ip,ig); sublime.save_settings(pr); print('Package Control: 3.0.0 upgrade successful!')

********


Package Control 3.0 adds a bunch of polish, improving the Sublime Text
experience for users and package developers:

- improved upgrades of themes, color schemes and syntaxes
- dependency support
- SSL for Linux
- new secondary Windows HTTP backend
- patches for Python in Sublime Text 2 on Windows
- commands to easily remove channels and repositories
- an events API for packages
- improved documentation


As of July 2014, I now work for myself. This has allowed me to spend more time
working on open source software, including Package Control. If you appreciate
the work I've done, please consider a small donation. If even 5% of regular
users donated the price of a coffee or beer, that would cover quite a bit of
my development time! See https://packagecontrol.io/about for options.


Some recent Package Control stats:

- every weekday over 1M JSON requests hit the channel server
- in December, the channel server will transmit 4TB+ of compressed JSON
- users have installed, upgraded or removed 85M+ packages since late 2011


Read more about the release at:

https://packagecontrol.io/news#2014-12-23-Package_Control_30_Released

Package Control が3.0 にアップグレードされたらしい。

とりあえず指示通りCtrl+` でテキストコンソールを開いて

import urllib.request,os; pr='Preferences.sublime-settings'; ip='ignored_packages'; n='Package Control'; s=sublime.load_settings(pr); ig=s.get(ip); ig.append(n); s.set(ip,ig); sublime.save_settings('Preferences.sublime-settings'); pf=n+'.sublime-package'; urllib.request.install_opener(urllib.request.build_opener(urllib.request.ProxyHandler())); by=urllib.request.urlopen('https://packagecontrol.io/'+pf.replace(' ','%20')).read(); open(os.path.join(sublime.installed_packages_path(),pf),'wb').write(by); ig.remove(n); s.set(ip,ig); sublime.save_settings(pr); print('Package Control: 3.0.0 upgrade successful!')

を入力してエンター。
ログとPackage Control: 3.0.0 upgrade successful! がコンソールに表示されて終わり。