Home Download Buy Blog Forum Support

Newbie: visible commands and keybindings?

Newbie: visible commands and keybindings?

Postby felciano on Sun May 02, 2010 1:18 am

Hello all --

I'm looking for a good code + writing editor on Windows and bought the E text editor last year because of TextMate support, but am looking for alternatives now that the E development seems to have slowed / stalled. I'm trying out Sublime and like its minimalism, but there are some things around TM bundles that I miss from E and am wondering whether they are truly missing or simply more subtly available in the UI.

For example:

1. In the E Texteditor bundles show up (among other things) as menus with commands. I can't find similar bundles-based menus in Sublime -- are these commands still there? For example, is there a way I can tell whether Sublime will help me cleaning up my HTML via a call out to tidy.

2. Similarly, in E, I can browse a bundle's keybindings in the UI so I see what is available. Is there some way in the UI to see the key-bindings that are available? For example, some way to tell me (without browsing the bundle code) that in an HTML document, hitting a and tab will insert a hyperlink snippet?

I realize that Sublime doesn't support drop-in replacement of TM bundles, but the above features don't seem to be present even for the provided bundles/packages. I'm a complete Sublime newbie so I may not fully grok e.g. bundles vs packages vs plugins in Sublime, but I couldn't find a clear answer to this in the manuals.

Thanks!

Ramon
felciano
 
Posts: 3
Joined: Sat Sep 26, 2009 9:04 pm

Re: Newbie: visible commands and keybindings?

Postby guillermooo on Sun May 02, 2010 7:09 am

I'm a complete Sublime newbie so I may not fully grok e.g. bundles vs packages vs plugins in Sublime, but I couldn't find a clear answer to this in the manuals.


Roughly speaking:

TM Bundle == ST Package (collection of plugins, snippets, options, language defs, etc)
TM Command == ST Plugin: python class derived from sublimeplugin.Plugin (or subclasses thereof). Interacts with ST's API and is one of the building blocks of a package (together with snippets, options, menus, etc).

Packge > (plugin, snippet, options, language def, menu file, build system...)

1. In the E Texteditor bundles show up (among other things) as menus with commands. I can't find similar bundles-based menus in Sublime -- are these commands still there? For example, is there a way I can tell whether Sublime will help me cleaning up my HTML via a call out to tidy.


Only plugins ( == "commands" in TM) that are defined in the HTML package will be available to you (ok, to be exact: plugins defined for the text.html scope; they could be placed anywhere under your /Packages folder). The plugin could show up in a menu under Tools/Packages if it included a .sublime-menu file to that effect, but to my knowledge not many of them do at the moment. I you want to check out whether a certain plugin is available, you can look directly at the Packages/<package_name> folder. You can access this folder through the menu item Preferences/Browse packages...

That said, some users have created more sophisticated ways of "introspecting" your packages, if you will: look for the user "sublimator" on BitBucket.org, for example.

2. Similarly, in E, I can browse a bundle's keybindings in the UI so I see what is available. Is there some way in the UI to see the key-bindings that are available? For example, some way to tell me (without browsing the bundle code) that in an HTML document, hitting a and tab will insert a hyperlink snippet?


I reckon someone has done this already in a plugin... You could look at the Sublime Text repo on Google Code (easy to find on Google) or the aforementioned user in BitBucket.

Hope this helps! Anyone, correct me if I'm wrong!

EDIT: Oh, how I wish this board was sublimeoverflow.com... :|
guillermooo
 
Posts: 728
Joined: Thu Jul 23, 2009 9:06 am

Re: Newbie: visible commands and keybindings?

Postby edanm on Sun May 02, 2010 7:18 am

@guillermooo: agreed, sublimeoverflow would be awesome.

But even better: I think we need a good documentation site which helps introduce newbies to the editor. The current wiki is just a list of packages (and not even *all* the packages, something which took me a while to find out).
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Re: Newbie: visible commands and keybindings?

Postby guillermooo on Sun May 02, 2010 7:30 am

@edanm: I'm toying with the idea of putting together that very kind of site. First off, it would list all known packages in any public repo so that you don't have to hunt for them in the wild world web. I think that would be appealing to most users. Docs etc would come later...

I have some code already, but I get constantly sidetracked... LOL I hope it works out in the end, though. Have some ideas for step by step howtos, etc too.
guillermooo
 
Posts: 728
Joined: Thu Jul 23, 2009 9:06 am

Re: Newbie: visible commands and keybindings?

Postby edanm on Sun May 02, 2010 7:50 am

I was thinking of setting up a site as well.
I don't have much time, but a little work once in a while would go a long way.

Problem is, I'm still pretty new to Sublime myself ;)
edanm
 
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Re: Newbie: visible commands and keybindings?

Postby n00ge on Mon May 03, 2010 11:20 am

For the sake of newbies, it might be useful to start including some menu options to view stuff like this within packages. Sublimator, if you want I can setup some .package-menu files for you and commit if you want. I don't think all the commands are necessary in there. In EditPreferences, just seeing listShortcutKeys and listCommands would probably be ideal.

I think it might make sense to have the package menu items a little more obvious too. Right now, they're under 'Tools > Packages' which feels buried. Might just be the naming. It sounds more like you're managing the Packages. Not sure what would work better.
http://twitter.com/n00ge
Sublime Text 3 dev builds | OS X 10.8.2 & Ubuntu 13.04
n00ge
 
Posts: 140
Joined: Mon Oct 05, 2009 1:23 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 17 guests