Home Download Buy Blog Forum Support

Support for .less files

Support for .less files

Postby lonlich on Fri Aug 26, 2011 12:11 pm

Hi! I'm not sure if this is a right place to post this topic so please transfer it elsewhere if it's not.

For quite some time I've been using Less which is a tool that allows you to write CSS and see how it dynamically applies to the document in the browser window without refreshing the page. It also has some nice features which is not available in CSS (variables, mixins etc.). I also love Sublime very much but it doesn't have support for .less extension. Because of that there is no syntax highlighting for .less files which leads to lots of typos and generally styling file is hard to read.

Is there any way to enable support for .less extension in Sublime?
lonlich
 
Posts: 3
Joined: Fri Aug 26, 2011 12:04 pm

Re: Support for .less files

Postby wuub on Fri Aug 26, 2011 12:42 pm

ST2 supports Textmate bundles, you can use this (clone it into your ST Packages directory)

https://github.com/appden/less.tmbundle

Image
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: Support for .less files

Postby lonlich on Fri Aug 26, 2011 1:31 pm

Thank you very much!
lonlich
 
Posts: 3
Joined: Fri Aug 26, 2011 12:04 pm

Re: Support for .less files

Postby chodorowicz on Wed Oct 19, 2011 2:26 pm

Does anybody now why this bundle, when using tab in less file (insert best completion) is inserting HTML tags? E.g. when I type "dis" and press tab it creates "<dis></dis>"
chodorowicz
 
Posts: 18
Joined: Tue Oct 11, 2011 4:04 pm

Re: Support for .less files

Postby matsaukeo on Sun Oct 23, 2011 9:24 am

Hi

Sorry if these are stupid questions but I'm new to this!

How do I go install this bundle? I downloaded a zip from github but do not know where to put it

Would this plugin automatically generate the css files? Or would it just use syntax highlighting?

Does it use the latest less.js?

Again sorry if those questions are basic!
matsaukeo
 
Posts: 12
Joined: Sun Oct 23, 2011 9:20 am

Re: Support for .less files

Postby chodorowicz on Tue Oct 25, 2011 7:25 pm

matsaukeo wrote:Hi
Sorry if these are stupid questions but I'm new to this!
How do I go install this bundle? I downloaded a zip from github but do not know where to put it
Would this plugin automatically generate the css files? Or would it just use syntax highlighting?
Does it use the latest less.js?
Again sorry if those questions are basic!

You need to put it in {sublime folder}/data/packages
No, the compiler is not included, it's basically syntax highlight and also autocompletion should work, but in my case the the autocomplete suggestion don't work to well

I need to dig a little bit into the format on of this tmbundle files and modify... when I have time
chodorowicz
 
Posts: 18
Joined: Tue Oct 11, 2011 4:04 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], raymanan and 15 guests