Sublime Forum

Is there a way to refer to the plugin directory?

#1

I was trying to modify a plugin from github.

Which has

{
     "caption": "Settings – Default",
      "command": "open_file", "args":
       {
           "file": "${packages}/pluginxxx/pluginxxx.sublime-settings"
       }
}

As I want to tweak the plugin, I copied it to User directory, then the file has to changed to

.

I am wondering is there a way to refer to the pluginxxx directory, so I can write file path like

?

Cheers.

0 Likes

#2

Oh, I made a mistake.

The package I copied to Packages is auto deleted, so I assume the way to try and tweak plugin is to put it into User directory.

But I do it again, this time it is not auto deleted.

Asking the wrong question. Sorry.

0 Likes

#3

[quote=“xiongmao86”]Oh, I made a mistake.

The package I copied to Packages is auto deleted, so I assume the way to try and tweak plugin is to put it into User directory.

But I do it again, this time it is not auto deleted.

Asking the wrong question. Sorry.[/quote]

If you are using Package Control and copy a package including a package-metadata.json file, you’ll find PC will delete it since you created an “orphaned” package. This is one that was installed by PC (hence the package-metadata.json), but is no longer in the “installed_packages” setting of Package Control.sublime-settings. If you just remove the package-metadata.json file, PC won’t touch it.

0 Likes

#4

Oh, I copied from github, so that is why the plugin is not deleted the second time. Thanks for the hint.

0 Likes