I wished Sublime came straight from the box with highlight support for Jade files, since it doesn’t, every time I change development machines or format my computer I find myself in the need of enabling Sublime to highlight Jade.
The process to do that is very simple, a one liner actually.
cd ~/Library/Application Support/Sublime Text 2/Packages && git clone https://github.com/miksago/jade-tmbundle.git Jade
cd ~/.config/sublime-text-2/Packages && git clone https://github.com/miksago/jade-tmbundle.git Jade
A few things about Sublime:
- Sublime is not OpenSource (I always thought the code was open)
- The project is maintained by one guy.
- It is very customizable.
- It has a solid and growing community
I’ve been using Sublime for a while now, but I never actually went further to investigate the editor.
Today I decided to finally go and look at how Sublime can start highlighting a new file extension by simple cloning something to the Packages folder.
It turns out that all you need to do is create a XML file with all the patterns matching the language keywords that is being supported.
<?xml version=“1.0” encoding=“UTF-8”?>
You can see the full source here
After finding that I got even more curious and started to look around in the Sublime website for any information about how to create Packages.
There is a nice summary explaining the process and giving some examples.
I also found this tutorial guiding step by step how to create a Package.
But what really surprised me was to find the huge number of available Sublime Packages
You can see the list here
It has a plugin for everything you can think of, no joke.
One that I thought was cool was the HackerNews plugin
Selecting Multiple Columns
The official Sublime website has a pretty nice list of the shortcuts to select multiple columns on different platforms
Mac: Option + Left Mouse click
Linux: Shift + Right Mouse click