It’s in essence just like css so is there any way to just make zen coding css commands run if the file extension ends in .less aswell as .css?
Zen Coding ( CSS Snippets )
I didn’t mention I’m using the less textmate bundle github.com/appden/less.tmbundle
ZenCoding works if I set the document type to CSS but not if I set it to LESS using that bundle.
[quote=“sublimator”]
Oh, rightio, I guess it’d be a matter of setting the right selector contexts on the bindings.
The expand abbreviation tab binding has a selector of ‘source.css’ which should match ‘source.css.less’ so I’m not sure what’s going on. Can you link me to the particular less bundle / syntax file you are using?
Which commands in particular aren’t working? They are definitely **working **for normal css?
( Some of the commands in the S1 ZenCoding relied upon regex bindings not yet available in S2. There are workarounds but I’m not going to bother properly looking into Zen on S2 until it ships with Python3.2, a QuickPanel API and regex bindings, and the next stable release of ZenCoding with its new API is out )[/quote]
Ah fixed it. My file was called base.less not base.css.less
Woo hoo!
I’m transitioning from N++ and this is another thing I was worried about.
But you got it covered!
Thanks you very much!
Yea hoping to see this for SB2 soon. About the only thing keeping me from using this full time over textmate. Not working for me on OS X.
Ahh I see. Looks like it doesn’t have the html5 stuff in there yet in the html_matcher stuff.
Also for some reason I can’t set it to super+alt+e similar to what it is in other editors. Just beeps at me. super+e works though.
Getting this in OSX ST2 would definitely make me move out of textmate.
+1 for adding the ZenCoding’s CSS Snippets in the default package.
Going to give a try to the recommendations in this thread to see if I can get it to work.
A small tutorial for the OSX guys unable to enable ZenCoding on SublimeText 2.
I’m running the latest Beta (launched today July 1st).
-
I’ve downloaded the ZenCoding.zip from the following thread:
Launching an external process -
Copy it here: /Users/YOURNAMEHERE/Library/Application Support/Sublime Text 2/Packages/
and extract it (you’ll get ZenCoding/ a bunch of .py files and another ‘zencoding’ subfolder)
Now, go inside Sublime Text 2 -> Preferences -> User Key Bindings… and paste in the text from here:
pastebin.com/Cg0EJshy (it’s the contents of the Default (Windows).sublime-keymap file which only gets used on Windows)
That’s it.
I was mainly after the ZenCSS expanders which got enabled properly. Haven’t tested the other ZenCoding functionalities, but they should probably work as well.
What is/are the expansion key(s) on OSX? I’ve tried the typical ones. I’ve checked in the the included files but don’t see it right off hand.
I do have tab completions enabled. A string like this:
ul#menu>li*5>a
expands to:
I just noticed the keymap files in the root of the HG checkout, I’m looking through those.
Thank you for zen coding!
I’ve played with it just few hours and it seems everything is fine but one small bug
[code]
[/code]when I execute split/join tag inside img the result is:
[code]
[/code]Yes, I’m have a fresh install of Sublime 2075 beta. The HTML bundle is installed so “a” will expand to by default. I can whack the HTML directory if that’ll help.
Hey,
I did exactly this, and I definitely have the latest build of Sublime Text. However, nothing seems to have changed? When I press Ctrl+Alt+Enter, the ‘Enter Koan’ thing fails to come up? Was there anything else I needed to do in order to get this to work?
Cheers
Decrements/increments work only in CSS, am I right? Could they be activated in HTML?
[quote=“timtamboy63”]
Was there anything else I needed to do in order to get this to work?[/quote]
It’d be helpful to list the platform you’re on, and if there’s any output in the console when you press the key binding (or any other text in the console in relation to any python errors).
Brilliant!
How would I add SCSS completions? Basically, enabling the CSS functionality for SCSS files would be enough.
I’ve enabled most of the commands by adding the relevant scopes to the keybind file. I’ve not been able to work out how the new dynamic completions work. For info, the only difference between CSS and SCSS scopes is that SCSS has a source.scss instead of source.css.