LESS syntax highlighting in Espresso
Post updated on 10 March 2012 to prevent syntax highlighting being overwritten when Espresso is updated
The lack of automatic syntax highlighting for LESS in Espresso was the only problem I had with it, but it turns out it’s incredibly easy to implement, just take these easy steps.
- Make sure Espresso is shut down.
- Open up a Finder window, press
Shift-Cmd-Gand type in/Applications/Espresso.app/Contents/SharedSupport/Sugars/. - Right click “
CSS.sugar” and press “Copy CSS.sugar”. - Press
Shift-Cmd-Gagain and type in/Library/Application Support/Espresso/Sugars. - Click in the Finder window and press
Cmd-Vto paste “CSS.sugar”. - Right click “
CSS.sugar” and press “Show Package Contents”. - Right click “
Languages.xml” and open in Espresso. - Duplicate the line
<extension>css</extension>and change the duplicated “css” to “less”. - Close your text editor and open up a LESS file in Espresso (if it’s not working, make sure you do a proper restart).
In case you’re confused, here’s what my Languages.xml file looks like:
