Sublime Forum

Newbie: visible commands and keybindings?

#1

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

0 Likes

#2

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…)

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.

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:neutral_face:

0 Likes

#3

@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).

0 Likes

#4

@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.

0 Likes

#5

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 :wink:

0 Likes

#6

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.

0 Likes