using LESS with Textmate
I'm just wondering how to get a .less file to render with code coloring in Textmate (currently when I open a .less file in Textmate all the fonts are just black)
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by johnhunter on 31 Jul, 2010 11:51 PM
Try installing a LESS bundle for TextMate. There are a couple that provide syntax highlighting and a key binding to run lessc on the file.
I'm using Mathew Byrne's as it seems to be regularly maintained: http://github.com/mathewbyrne/less.tmbundle
Signup for a github account to get a zip of the bundle - rename the unzipped file to 'mathewbyrne-less.tmbundle' and double-click to install.
2 Posted by Eschi on 07 Dec, 2010 05:07 PM
My TextMate tells me after double clicking the renamed unzipped file that there is no plist and it is occured
help plz :D
3 Posted by crunch on 24 Aug, 2011 03:07 AM
If you only need to have the CSS syntax highlighting applied in textmate, the simplest way to effect this is to edit the CSS bundle:
-- open the bundle editor
-- open/expand the CSS bundle in the left column
-- find and select the 'Language' element called 'CSS' (icon: grey circle with letter L)
-- edit the third line to include the 'less' extension eg:
fileTypes = ( 'css', 'css.erb', 'less' );
4 Posted by Bryan Kearney on 24 Aug, 2011 08:53 PM
those are great suggestions... but as I'm new to TextMate (coming from Coda) I just used the menu at the bottom left. See the pic. Hope it helps.
5 Posted by Andrew on 04 Jan, 2012 04:08 AM
Thanks @crunch, an excellent suggestion!
6 Posted by Njanga on 08 Aug, 2012 08:43 PM
Great suggestion. It works perfectly.