GithubHelp home page GithubHelp logo

jade.mode's Introduction

jade.mode

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

Installation

Simply check out this repo into either ~/Library/Application Support/Coda 2/Modes as jade.mode and you're set!

Features

  • Updated for Coda 2
  • 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, html comments, and unbuffered
  • 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

Additional Style Scopes

In case you want to tweak your theme a bit, you can add the following scopes in a sort of progressive enhancement. Their absence isn't a big deal.

  • Unbuffered comments comment.unbuffered.jade
  • HTML Generic Tags markup.tag.attribute.name.generic.jade
  • IDs markup.tag.attribute.name.id.jade
  • Classes markup.tag.attribute.name.class.jade
  • Interpolation language.variable.interpolation.jade
  • Escaped Interpolation language.variable.interpolation.escaped.jade

Author

Credits

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

jade.mode's People

Contributors

bluestrike2 avatar

Stargazers

Andrea Franchini avatar 平江 avatar Ilija Tovilo avatar Mark Miles avatar  avatar Topaz T avatar Jacob Kelley avatar Paul Reny avatar Ash avatar  avatar Andy avatar Josh Medeski avatar Christian Hammer avatar  avatar Даниил Пронин avatar Mike M. Lin avatar JT5D avatar  avatar Seiya KONNO avatar Pierce Moore avatar Danny Siu avatar Fernando Falcao avatar Laurian Gridinoc avatar

Watchers

 avatar David Lima Cohen avatar Allen Weiss avatar

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.