Git Product home page Git Product logo

jade.mode's Introduction

jade.mode

jade.mode is a jade syntax definition for SubEthaEdit & Coda. It is not complete, but it is useful. Please fork, make suggestions or otherwise help as you see fit.

Coda 2 support!

@bluestrike2 (Tom Stoecklein) has created a Coda 2 version of the mode. It is available in the coda2_master branch

Installation

Simply check out this repo into either ~/Library/Application Support/Coda/Modes or ~/Library/Application Support/SubEthaEdit/Modes, be sure to name the directory jade.mode.

Features

  • Highlights all valid HTML5 tags
  • Supports embedded HTML
  • Highlights all text preceded by -, = or != as the first non-whitespace character as though it were Javascript
  • Highlights save (#{foo}) and unsafe (!{bar}) interpolations
  • Highlights doctype declarations (!!! or doctype or <!DOCTYPE style)
  • Highlights single-line comments
  • Highlights jade-specific keywords (block, extends, etc.) when they are the first non-whitespace character.

Known Issues

  • Multi-line comments are unsupported due to limitations of the syntax definition language used by SubEthaEdit & Coda (No capturing groups in regex)
  • Code that is not preceded by -, = or != as the first non-whitespace character is not highlighted
  • Code following a tag plus equal sign construct (eg, p= foo || 'bar') is not highlighted
  • Embedded JS blocks via script tag are currently not highlighted
  • Block expansion (eg, li.foo: a(href='bar')) is not supported only the first tag on the line is highlighted

Authors

Aaron McCall Tom Stoecklein (Coda 2 refactor)

Credits

James Menera gave me invaluable feedback and encouragement. Thanks, James!

jade.mode's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jade.mode's Issues

Trouble with Coda 2

I've tried installing your jade.mode syntax in Coda 2 (which I would LOVE LOVE LOVE to have working).

Unfortunately, I don't get any syntax coloring, and I get these errors the first time I start Coda 2 after installing:

XML Structure Error:
“/Javascript/AutodocComment” has no . This confuses me. Please check your syntax definition.

“/Javascript/Comment” has no . This confuses me. Please check your syntax definition.

“/Javascript/Regular Expressions” has no . This confuses me. Please check your syntax definition.

“/Javascript/String” has no . This confuses me. Please check your syntax definition.

“/Javascript/SingleString” has no . This confuses me. Please check your syntax definition.

I tried removing those lines from SyntaxDefinition.xml. I no longer get the errors, but no syntax coloring either, even though "jade" is selected as the syntax mode.

I would love to have this working, and I might even be able to contribute to the project if you can point me in the right direction. I did install this LESS syntax mode in Coda 2 and it is working perfectly: http://blog.building-blocks.com/less-syntax-highlighting-coda-2

Thanks very much for your hard work on this!!
Justin Schier

/* ~ */ comment block

Thank you for your stuff. It is very useful.

I'm using jade.mode in Coda 1.7, and It works very well.
I usually add javascript block in .jade .
but /* ~ */ block doesn't become to green.

Can you fix it for us?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.