ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Combyne

by kadamwhite ALL

Sublime Text 2 / 3 package for Handlebars.js templates.

Details

  • 0.1.0
  • sublime.​wbond.​net
  • 9 years ago
  • 16 minutes ago
  • 9 years ago

Installs

  • Total 223
  • Win 112
  • Mac 85
  • Linux 26
Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10 Mar 9 Mar 8 Mar 7 Mar 6 Mar 5 Mar 4 Mar 3 Mar 2 Mar 1 Feb 29 Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sublime Text 2 / 3 Combyne.js bundle

  • Colours of Combyne expressions are selected to be in contrast with the surrounding HTML.
  • Combyne expressions get syntax highlighting in HTML attributes.
  • Parameters passed to block expressions get syntax highlighting too.
  • Works both with individual template files and inline templates in script tags.
  • Key bindings for {%-- Combyne comments --%}
  • Tab triggers for
    • if{%if%}
    • ifel{%if%} {%else%}
    • el{%else%}
    • each{%each %}
    • par{%partial %}

About Combyne.js

Official website: github.com/tbranyen/combyne

Installation

Get it through Sublime Package Control.

If you haven't used it yet, just install it from the link above and then:

  1. Press Shift + Command (or Control) + P
  2. Type “install”, to bring up the “Package Control: Install Package” option, and press Enter
  3. Look for “Combyne”, and press Enter to install it.
  4. Choose “Combyne” in the bottom right corner with one of your template files open. If you are using Combyne for an inline script, the syntax should be gracefully extended so as not to impact other HTML.

Package Control will also auto-update the package from this point on!

Testing / contribution

This was created by forking the Handlebars Sublime library, and roughing it up a bit. There's a lot more to do, and contributions are welcome!

There are some sample templates in test/ folder. It's possible to see the different supported and yet to be implemented use cases there.

If you want to work on the package you should install AAAPackageDev either from Github or from Package Control. With that you can edit the JSON version (Handlebars.JSON-tmLanguage) and let it export the Plist with the ST Build System.

The nicest development setup I found so far is to have the package installed via Package Control and then symlinking the development Git repo to Sublime settings folder > Packages, which then overrides the installed one so you can toggle between them easily.

Another great trick I found out about recently is the Show scope name shortcut (Shift + Control + P (OSX) or Shift + Control + Alt + P (Windows)) which will display the language scope on the status bar based on where your cursor is. If you're getting tired of pressing all these keys all the time, there are a few brilliant packages which do this automatically like the more subtle ScopeAlways or the full on ScopeHunter – note: both need to be activated via the Command Palette.

Resources on ST / Textmate syntax definitions:

http://docs.sublimetext.info/en/latest/extensibility/syntaxdefs.html http://manual.macromates.com/en/language_grammars

Precompilation

This package does not offer any precompilation functionality. Check the Combyne repository for all information about compiling and using Combyne templates.

Credits

Forked from the great Handlebars package by Daniel Demmel, which was in turn based on sublime-text-handlebars by Nicholas Westlake.

License

(The MIT License)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.