using LESS with Textmate

Jonathan Simmons's Avatar

Jonathan Simmons

26 Jul, 2010 06:24 PM

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)

  1. 1 Posted by johnhunter on 31 Jul, 2010 11:51 PM

    johnhunter's Avatar

    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. 2 Posted by Eschi on 07 Dec, 2010 05:07 PM

    Eschi's Avatar

    My TextMate tells me after double clicking the renamed unzipped file that there is no plist and it is occured

    help plz :D

  3. 3 Posted by crunch on 24 Aug, 2011 03:07 AM

    crunch's Avatar

    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. 4 Posted by Bryan Kearney on 24 Aug, 2011 08:53 PM

    Bryan Kearney's Avatar

    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. 5 Posted by Andrew on 04 Jan, 2012 04:08 AM

    Andrew's Avatar

    Thanks @crunch, an excellent suggestion!

  6. 6 Posted by Njanga on 08 Aug, 2012 08:43 PM

    Njanga's Avatar

    Great suggestion. It works perfectly.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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