The simplest solution is to modify zencoding/interface/editor.py file.
You should update get_syntax() method (line 168) so it matches LESS scope but returns it as CSS.
try:
if 'xsl' in scope:
doc_type = 'xsl'
else:
doc_type = re.findall(r'\bhtml|js|less|css|xml|haml\b', scope)[0]
# Sublime has back to front scopes ....
except:
doc_type = default_type
if doc_type == 'less':
# serve LESS documents as CSS
doc_type = 'css'
if not doc_type: doc_type = default_type
return doc_type
___________________________________________
Сергей Чикуёнок
http://chikuyonok.ru serge....@gmail.com
On Wednesday, July 4, 2012 at 10:46 AM, IschaGast wrote:
> I am a big fan of zencoding but it looks like there is no LESS support in Sublime Text, is there a way to get this working?
Is there a way to add Zen coding support to LESS files with Espresso for mac? I am also looking to see if this is supported within PHPstorm software also?
On Wednesday, July 4, 2012 9:01:53 AM UTC+1, Sergey Chikuyonok wrote:
> The simplest solution is to modify zencoding/interface/editor.py file. > You should update get_syntax() method (line 168) so it matches LESS scope > but returns it as CSS.
It’s pretty hard right now: you have to modify minified JS file and update getSyntax() method of ZenEditor object in order to detect and handle LESS syntax.
I’m working on new Zen Coding version with Espresso developers and I think new version will feature basic LESS support.
PHPStopm plugin is developed by JetBrains team from scratch so you’d better ask them.
___________________________________________
Сергей Чикуёнок
http://chikuyonok.ru serge....@gmail.com
On Wednesday, July 11, 2012 at 3:44 PM, jakethesnake wrote:
> Hi there,
> Is there a way to add Zen coding support to LESS files with Espresso for mac? I am also looking to see if this is supported within PHPstorm software also?
> Thanks in advance
> On Wednesday, July 4, 2012 9:01:53 AM UTC+1, Sergey Chikuyonok wrote:
> > The simplest solution is to modify zencoding/interface/editor.py file.
> > You should update get_syntax() method (line 168) so it matches LESS scope but returns it as CSS.
Never used Google groups before, but this is great thanks! Yes I had a look at the minified js file but it looked a bit too much. Thought it would be a simple thing like adding a ".less" next to the ".css" and ".html" in a settings file.
If you have something sorted for now, perhaps you could send me files that I could replace within my TEA of Espresso package folder?
-Its fine if you dont.
On Wednesday, July 11, 2012 12:53:10 PM UTC+1, Sergey Chikuyonok wrote:
> It’s pretty hard right now: you have to modify minified JS file and > update getSyntax() method of ZenEditor object in order to detect and handle > LESS syntax. > I’m working on new Zen Coding version with Espresso developers and I think > new version will feature basic LESS support.
> PHPStopm plugin is developed by JetBrains team from scratch so you’d > better ask them.
> ___________________________________________
> Сергей Чикуёнок
> http://chikuyonok.ru > serge....@gmail.com
> On Wednesday, July 11, 2012 at 3:44 PM, jakethesnake wrote:
> Hi there,
> Is there a way to add Zen coding support to LESS files with Espresso for > mac? I am also looking to see if this is supported within PHPstorm software > also?
> Thanks in advance
> On Wednesday, July 4, 2012 9:01:53 AM UTC+1, Sergey Chikuyonok wrote:
> The simplest solution is to modify zencoding/interface/editor.py file. > You should update get_syntax() method (line 168) so it matches LESS scope > but returns it as CSS.
In minified zen.js file, find ZenEditor.prototype.getSyntax function. The first variable is a map of Espresso syntax selectors and Zen Coding’s syntax and looks like this:
var c={"css, css *":"css","xsl, xsl *":"xsl","xml, xml *":"xml","haml, haml *":"haml"};
Try to add LESS syntax and map it to Zen Coding’s CSS syntax:
var c={"less, less *": "css", "css, css *":"css","xsl, xsl *":"xsl","xml, xml *":"xml","haml, haml *":"haml"};
___________________________________________
Сергей Чикуёнок
http://chikuyonok.ru serge....@gmail.com
On Wednesday, July 11, 2012 at 3:44 PM, jakethesnake wrote:
> Hi there,
> Is there a way to add Zen coding support to LESS files with Espresso for mac? I am also looking to see if this is supported within PHPstorm software also?
> Thanks in advance
> On Wednesday, July 4, 2012 9:01:53 AM UTC+1, Sergey Chikuyonok wrote:
> > The simplest solution is to modify zencoding/interface/editor.py file.
> > You should update get_syntax() method (line 168) so it matches LESS scope but returns it as CSS.
On Wednesday, July 11, 2012 1:04:57 PM UTC+1, Sergey Chikuyonok wrote:
> In minified zen.js file, find ZenEditor.prototype.getSyntax function. The > first variable is a map of Espresso syntax selectors and Zen Coding’s > syntax and looks like this:
> var c={"css, css *":"css","xsl, xsl *":"xsl","xml, xml *":"xml","haml, > haml *":"haml"};
> Try to add LESS syntax and map it to Zen Coding’s CSS syntax:
> var c={"less, less *": "css", "css, css *":"css","xsl, xsl *":"xsl","xml, > xml *":"xml","haml, haml *":"haml"};
> ___________________________________________
> Сергей Чикуёнок
> http://chikuyonok.ru > serge....@gmail.com
> On Wednesday, July 11, 2012 at 3:44 PM, jakethesnake wrote:
> Hi there,
> Is there a way to add Zen coding support to LESS files with Espresso for > mac? I am also looking to see if this is supported within PHPstorm software > also?
> Thanks in advance
> On Wednesday, July 4, 2012 9:01:53 AM UTC+1, Sergey Chikuyonok wrote:
> The simplest solution is to modify zencoding/interface/editor.py file. > You should update get_syntax() method (line 168) so it matches LESS scope > but returns it as CSS.