Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export list of installed packages in SublimeText

Tags:

I am aware that I can see all installed packages in Sublime using Ctrl+Shift+P and selecting Package Control: List Packages.

I have many packages installed (>20) and I need a way to export their names (and ideally also the link to their https://packagecontrol.io/ page) to a text file or similar output.

Can this be done at all?

like image 381
Gabriel Avatar asked Jun 04 '17 00:06

Gabriel


People also ask

How do I see what packages are installed in Sublime Text 3?

Click the Preferences > Browse Packages… menu. Browse up a folder and then into the Installed Packages/ folder. Download Package Control.sublime-package and copy it into the Installed Packages/ directory. Restart Sublime Text.

How do I check my packages in Sublime Text?

You can find a list of all the packages installed in your Sublime Text editor with Package Control. First open Package Control from Preferences > Package Control as before. Now click on Package Control: List Packages from the list as marked in the screenshot below.

Where are packages installed sublime?

<data_path>/Installed Packages/


1 Answers

You can easily get the list of installed packages by looking at Package Control's user preferences file: Preferences -> Package Settings -> Package Control -> Preferences - User and checking the installed_packages value.

Getting the URL as well is a bit more complicated, but can be done for example by executing the following in ST's Python console (View menu -> Show Console):

import os; [(os.path.dirname(file)[len('Packages/'):], sublime.decode_value(sublime.load_resource(file))['url']) for file in sublime.find_resources('package-metadata.json')] 
like image 166
Keith Hall Avatar answered Sep 21 '22 03:09

Keith Hall