sublimetext2 - Sublime Text 2 Command to open User Packages -


i want make simple command open user packages in sublime. created new plugin , wrote this:

import sublime_plugin, os  class userpackagescommand(sublime_plugin.textcommand):     def run(self, edit):         os.system("subl ~/library/application support/sublime text 2/packages/user") 

when open console , run view.run_command("user_packages") nothing happens. when open command pallet, command doesn't show up.

thanks

import sublime, sublime_plugin, subprocess  class userpackagescommand(sublime_plugin.textcommand):     def run(self, edit):         cmd = []         cmd.append('subl')         #cmd.append('-a')         cmd.append(sublime.installed_packages_path())         subprocess.popen(cmd, stdout=subprocess.pipe, shell=false) 

to add folders current project (append sidebar) uncomment -a argument line.

edit: after editing works independently os , st package directory path if have subl command available.


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -