5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Sublime Text3 の Package Control に自作プラグインを対応させる際のポイント

Posted at

Sublime Text 3 対応を検討しているプラグイン開発者向け情報です。

現在 Package Control では、Packages フォルダの中にそのままの形でファイルが配置されています。ところが Sublime Text 3 になると、デフォルトで Installed Packages の中に圧縮形式 (.sublime-package) で配置されるようになります。

つまり、今まで自作プラグインで自分のプラグインフォルダのファイルを参照している人は、Sublime Text 3 向けに以下のいずれかの対応をしなければなりません。

  • load_resource() か load_binary_resource() を使ってファイルにアクセスするように、スクリプトを変更する (Sublime Text API Refrence)。

ただしこの方法にすると、Package Control を使わずに git clone などでインストールしたときに、プラグインでファイルにアクセスできなくなります。ならば最初から .sublime-package を作って、それを公開してしまう手があります。その場合の packages.json はこちらが参考になります

  • .no-sublime-package ファイルを置く。

参考 URL :
https://github.com/wbond/sublime_package_control/issues/349

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?