Sublime Forum

A (Very Basic) Package Manager

#1

[size=150]PackageManager[/size]

Direct download: PackageManager.sublime-package

The name is quite pretentious, especially considering the meager features at the moment:

  • Download .sublime-package files and copy to Installed Packages (non-blocking)
  • Uninstall packages by deleting package folder from Packages and .sublime-package file from Installed Packages
  • Check for updated versions of packages (blocking)
  • Adding repo urls to the database (this might not be working, though)

Itā€™s been very little tested and generally hopes for the best: no error checking (not even for an inexistent Installed Packages folder), no proxy support, etc.

What it does is downloading a tip revision as a .zip file from GitHub repositories and performing renaming and copying as needed, so it isnā€™t very smart. If people find it useful, though, I might improve it and eventually move it to the SublimeText org.

[size=150]Warning: It might download harmful files and it might delete files you donā€™t want deleted. Use at your own risk, etc.[/size] [size=60]Hope you like it, though.[/size]

Check the readme on the BitBucket page for more info.

0 Likes

Plugins repository & manager
#2

ā€¦but how do I install the package manager itself? I need a package-manager manager! :frowning:

seriously though, this is pretty cool. Iā€™m gonna give it a try.

0 Likes

#3

The wiki link to download the .sublime-package has the wrong case: bitbucket.org/guillermooo/PackageManager/downloads/PackageManager.sublime-package instead of
bitbucket.org/guillermooo/packagemanager/downloads/PackageManager.sublime-package

0 Likes

#4

Oops. True. I never get around to updating my templatesā€¦

About installing the package manager, yeah, it must be done manually, at least for the time being (and in any case, always the first time). Just drop the .sublime-package file in Data/Installed Packages and create Installed Packages if it doesnā€™t exist yet.

0 Likes

#5

Yeah, I was just kidding. :stuck_out_tongue:

I donā€™t know if you can do pull requests or whatever with Hg, but I duplicated Default (Windows).sublime-keymap, named it Default (OSX).sublime-keymap and changed all the ctrls to supers. Now I can actually check boxes. :smile: Iā€™ll let you know if I can install stuff.

Also, I already had CTags (sublimatorā€™s) installed but it says ā€œUNINSTALLEDā€ in the listā€”does it just only know if things are installed if theyā€™ve been installed through it?

Thanks!

0 Likes

#6

Haha, yeah, Iā€™m not very considerate with other platforms and pretty lazy too. Iā€™ll try to fix the key maps.

The package manager is pretty stupid. If thereā€™s a XXX package in Packages, but not a corresponding XXX.sublime-package in Installed Packages, it will asume it doesnā€™t exist. :smiley: There might be other similar bugs.

0 Likes

#7

And I should read posts until the endā€¦ Yeah, what you sayā€™s right! :slight_smile:

0 Likes

#8

Excellent. :smile:
Itā€™d be sweet if at the bottom of the table it printed a help message about how to install, uninstall, add, etc. Iā€™m flipping back and forth between the keymap and the table to figure out how to do things. Is there an easy way to figure out the key mapped to a command? I started writing something but I donā€™t want to hard-code values.

0 Likes

#9

@sublimator showed a preview of a very cool plugin that would do that; teleport you to commands/settings/key bindings. But I donā€™t think heā€™s published it yet? I think he wonā€™t until Jon adds monospace fonts to the quick panel, haha. Hope that happens before v3. In other words, I donā€™t think there is any way of doing that atm, no.

Iā€™ll add the tips at the end. Cheers.

0 Likes

#10

I also just busted this out a little bit:

[code]ā€” /Users/nikolaus/Library/Application Support/Sublime Text 2/Packages/PackageManager/package_manager_ui.py Wed Aug 3 15:52:53 2011
+++ /Users/nikolaus/Library/Application Support/Sublime Text 2/Packages/PackageManager/package_manager_ui.py Wed Aug 3 15:52:58 2011
@@ -53,7 +53,14 @@

class PackageManagerUiCommand(sublime_plugin.WindowCommand):
def run(self):

  •    ui = self.window.new_file()
    
  •    ui = None
    
  •    for v in self.window.views():
    
  •        if 'Package Manager - Sublime Text' == v.name():
    
  •            ui = v
    
  •            self.window.focus_view(ui)
    
  •            break
    
  •    if ui == None:
    
  •        ui = self.window.new_file()
       ui.set_name('Package Manager - Sublime Text')
       draw_frame(ui)
       load_package_data(ui)[/code]
0 Likes

#11

Cool, Iā€™ll be adding this stuff when I get some sleep :wink: Thanks!

0 Likes

#12

Yeah, that looked really sweet. Iā€™m looking forward to it :smile:

Thanks!

A couple things:
I installed CTags for real through the package manager, but it didnā€™t update the UNINSTALLED to an INSTALLED until I closed and reopened the buffer.
I see the soda theme and the latex-tools in the catalogue but not in the manager or in the catalogue-db. I havenā€™t yet investigated why this is but just thought Iā€™d say.
Also, if the package manager were in github it could update itself. Just saying :stuck_out_tongue:

Thanks again! This is really awesome.

0 Likes

#13

I personally have been using the github.app for OS X to manage all my packages. It makes it extremely easy to update and manage packages. Apparently a windows version is on its way, too. Just sayingā€¦

0 Likes