Sublime Forum

Creating a plugin based on one of the default ones?

#1

While answering this Stack Overflow question, I came up with the idea of producing a fairly simple yet configurable plugin so users can switch between the default commenting behavior and the one described, where the comment symbol(s) are all placed starting in the first column. However, the vast majority of the code would, by necessity, be taken from ‘Packages/Default/comment.py’, and I’m just wondering if that’s OK. I wasn’t around for the discussion (if there was one), but I do know that the contents of ‘Packages/Default’ were explicitly excluded from sublimehq/Packages, so does that mean they haven’t been released for public use? Have any of you encountered this situation?

0 Likes

#2

I will be honest. Allowed usage of Sublime’s Python files isn’t really clear. With that said, I have totally stolen stuff from comment.py before; I think I did it via a pull request for someone’s plugin. I’ve overriden other things before as well.

This is my opinion: I don’t think Jon cares. People developing plugins is what fuels interest in Sublime, so I think it would be in Jon’s interest to not make a stink about it. Stuff like that, I usually put in a separate file and make a note from where I stole it from. I just figured if Jon stumbled upon it and was angry, he would just tell me to take it down; which I doubt will ever happen.

Syntax files are a lot of work, so it was really in Jon’s best interest to let people loose on that. People were literally foaming at the mouth to get a hold of those. Technically all that syntax stuff came from TextMate anyways. As for the Python scripts, I think Jon still want’s to keep control of the scripts for development and releases, but you are free to override them as you feel.

Now obviously these are just my opinions as Jon as never said anything official about it except that you can override default packages.

0 Likes