Home Download Buy Blog Forum Support

Simple View/Window Template?

Simple View/Window Template?

Postby mr.b on Sun Jan 26, 2014 12:39 pm

Hi,
I'm starting development of a new debugger plugin for ST and unsure where to start.

I have looked at some other plugins that have more complex views/windows, but am hoping to find some sort of clean tutorial or template for views with tabs, etc. to start my development from as an example.

Any suggestions appreciated. I have already looked at the tutsplus tutorial, but it doesn't include much on views.

Thanks!
mr.b
 
Posts: 3
Joined: Sun Jan 26, 2014 12:34 pm

Re: Simple View/Window Template?

Postby mr.b on Thu Jan 30, 2014 9:08 am

Bump. Anybody?

Given how awesome ST is and how many people making plugins it seems odd there's so few tutorials or examples :(
mr.b
 
Posts: 3
Joined: Sun Jan 26, 2014 12:34 pm

Re: Simple View/Window Template?

Postby skuroda on Thu Jan 30, 2014 10:19 pm

If possible, can you expand on what you are trying to do with the windows/views. Most developers explore other plugins or just experiment. That being said, I'm sure new plugin developers such as yourself would like to see more tutorials related to ST and plugins. Just have to get someone to spend the time doing it I suppose.
skuroda
 
Posts: 685
Joined: Fri Oct 05, 2012 8:11 am

Re: Simple View/Window Template?

Postby mr.b on Tue Feb 04, 2014 8:20 am

As mentioned in the original post, I'd like to make a new debugger for ST. It needs multiple tabs, split views for stack traces, watch variables, etc. I was hoping to setup a clean/robust multi-file template to work from. I have domain expertise in writing the debugger side, but not in gluing this to ST in a robust and efficient way with few examples to go by except picking apart other people's plugins to see how they did things.

For example, I saw that GoGdb uses a file called "GoGdb.sublime-settings" to encode some layouts with rows and columns. Is this a recommended way to setup views and other variables? Be great to see an official example of using the various types of files ST recognizes.

I guess I was thinking some simple templates for ST plugins that cover the main use-cases would be nice as a starting point. Once somebody is an expert, there's of course a dozen ways to do something. It would be nice though to be given complete examples of _one_ way to do something that can be built upon.

But back to my original post, any simple example you could give me to understand the layout and plumbing for more complex ST plugins?

Thanks!
mr.b
 
Posts: 3
Joined: Sun Jan 26, 2014 12:34 pm

Re: Simple View/Window Template?

Postby skuroda on Sat Feb 08, 2014 3:09 am

Yes, setting the layout will consist of something similar to this.

{
"keys": ["super+alt+1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
}

The cols, rows, and cells define what the window will look like. I haven't done much with layouts before, so I can't help you much there. The *.sublime-settings files store settings relevant to a given plugin. You specify the name of this plugin when you run sublime#load_settings. I'll see if I can come up with some additional plugins that may help you. Feel free to ask more questions. There are no notifications on this forum, so you may also want to try posting on stack overflow. I know there are a handful of ST plugin developers who watch those tags.

If you haven't already, you msay want to take a look at http://code.tutsplus.com/tutorials/how- ... -net-22685. While it doesn't cover everything, it's not a bad starting place for getting acquainted with ST plugins. As that tutorial was written for ST2, it may not work in ST3. If that's the case, you can grab a version of ST2 to go through the tutorial, or try to figure it out yourself. There aren't many changes between ST2 and ST3, but those are relatively easy to explain if you are familiar with ST2 plugins.
skuroda
 
Posts: 685
Joined: Fri Oct 05, 2012 8:11 am


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 8 guests