Chapter 8. Developing Your Own Plugin

This chapter takes you step-by-step through the process of developing a plugin for Sublime Text and publishing it to the community. In this chapter we will cover the following topics:

  • Warming up before starting a plugin
  • Starting a plugin
  • Developing the plugin
  • Publishing our plugin

Warming up before starting a plugin

We have seen that plugins can be very helpful in many situations, so it's time for us to develop our own! Before starting, we need to know a few things; the first is an idea for a plugin. In our case, we will develop a Ruby on Rails plugin that will help us identify relationships between ActiveRecord models. ActiveRecord models can define relationships with other ActiveRecord models that are defined across different files, creating a plugin that will automatically open all the related files. This plugin can be very helpful for a Rails developer.

It is also important to have the Sublime Text API open simultaneously. It can be found at http://www.sublimetext.com/docs/3/api_reference.html. Lets not forget a name for our plugin! In our case, we will call the plugin RelationsFinder. The Default Packages folder is full of useful open source plugins with code snippets and examples.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset