Sublime Forum

How to know which package is running in my sublime text 3?

#1

I am using the Sublime text 3 dev version now. Its awesome!

The question I have is that how can i know that which of my packages is running while I am editing? Obviously I dont want my python plug-in running in the background while i am coding in php or html.

If this question is dumb, sorry about that.

But I still want to know lol I have no idea how this works

Nice day guys!

0 Likes

#2

Wether a package ignores certain filetypes depends on the author of the package. There are various ways in which a plugin author can accomplish this (e.g. check the syntax and bail out, use a ViewEventListener with an appropriate is_applicable, etc).

Usually the console is a good place to check if there are any packages that do something unintended. (View -> Show Console).

By default all packages are “running”. That means all of their commands get loaded into memory, all of their EventListeners get instantiated (once) and all of their ViewEventListeners get instantiated if applicable (per view), all of their snippets get loaded into memory, all of their keybindings get registered, etc. The plugin author has to make sure that their snippets and keybindings get masked correctly.

0 Likes

#5

sounds making sense… But can i know if there is any place I can check for console commands? Dont see it on Support page lol

0 Likes

#6

The console is a Python interpreter. You can, for example, type this:

>>> sublime.version()
>>> sublime.platform()
>>> view.substr(view.line(0))
>>> view.name()
>>> view.settings().get("syntax")
>>> view.settings().get("color_scheme")
>>> window.views()

To log all of the commands, you can type:

>>> sublime.log_commands(True)

You can also import os and import sys and use those modules, just like in a python script.

1 Like

#8

hm… so can i check these scripts? so for the example you gave me. How can i know where’s class sublime? no idea how to find those methods under it.
My python sucks btw. lol

0 Likes

#9

Here is the complete API reference, enjoy :slight_smile:

There’s a bit more stuff about commands that you should understand. Read that here. This link might also be useful.

0 Likes

#10

Oh thank you!!! thats exactly what i want!

0 Likes

#11

btw I guess there is a bug on replying messages… No idea why it doesnt show the message i posted was replying to you…

0 Likes

#12

That’s one of it’s problem: it’s not complete

0 Likes

#13

OverrideAudit is completely ST3 only. :worried: Did you know, that I know absolutely nothing!

0 Likes

#14

This plugin show which plugins are enabled or disabled https://packagecontrol.io/packages/PackagesUI

0 Likes