Sublime syntax highlighting for Riot JS TAG files. Witin sublime you can use HTML, but this doesn't work well with coffeescript.
With this plugin you can use
<yourtag>
<script type="test/coffeescript">
# your coffee script here
</script>
</yourtag>
This will then have correct syntax highlighting.
I've been messing a little with the jade support in riot, again having syntax issues when combining with coffeescript. Jade can compile the coffeescript itself but I had a few issues with this. To use the jade support follow the same instructions below, but selet Riot(Jade) as the syntax.
yourtag
p hello world
script(type="text/coffeescript").
# your coffee script here
You'll then need to make sure your riotify settings are correct in your package.json file
{
"scripts": {
"watch": "watchify src/app.coffee -o build/app.js"
},
"browserify": {
"transform": [
["riotify",{"expr": false,"type": "coffee","template": "jade"}]
]
}
}
- You will need the Package Control Package Manager for Sublime
- Open the command pallete with
⌘+shift+p
- Type
install
and selectPackage Control: Install Package
- Wait a moment for the package list to appear, and type
tag
and selectTAG Syntax
- Open a .tag file and in the lower right hand corner of your Sublime window, open the syntax dropdown.
- Select "Open all with current extension as..." and then choose 'Riot Tag'
To install this plugin from Github, follow these steps:
- Open Sublime and open "Package Control" (cmd + shift + p).
- Type "Add Repository"; select the result (hit enter).
- At the bottom of your Sublime window you will see a text input that prompts you for the Github URL.
- Copy and paste: "https://github.com/crisward/sublime-tag".
- Give Sublime a few minutes to add the repo.
- Open "Package Control" again (cmd + shift + p) and type "Install Package".
- Type "sublime tag"; select the result (hit enter).
- Give Sublime a few minutes to install the package.
- Open a .tag file and in the lower right hand corner of your Sublime window, open the syntax dropdown.
- Select "Open all with current extension as..." and then choose 'Riot Tag'
Thanks to Kevin Wood kevin@guidebook.com, as I've used his sublime CJSX plugin repo as a template to setup this repo.