Sublime Forum

Zen Coding ( CSS Snippets )

#61

Now this is probably very strange but i reinstalled the version on Google then open the default keymap and looked for the change here…

bitbucket.org/sublimator/zencod … 87ff705fd8

Which had already been applied to that version but it still wasn’t working for me. So I switch it back to the massive key binding that was removed and now my custom snippets and Zen are working fine together :smile:

0 Likes

#62

Spoke too soon. It has the bug of not working with snippets containing “:” :frowning:

0 Likes

#63

Zen-coding plugin is great. Thanks for that.

I have some questions:
1) Format CSS rule doesn’t work - code.google.com/p/zen-coding/wiki/Filters

Have tryed to change alias to “html, fc” inside “Sublime Text\Packages\ZenCoding\zencoding\filters\format-css.py” - no effect.

2) Is it possible, to expand abbrreviations like “input:t” on Tab for html? Alt+E is not convenient.

3) How to add text inside link or some block, when we use ctrl+alt+enter? Like, we should get this:

[code]


sometext

someanchor
[/code] We type: div>div+(div>a) What about text, which command is used for it?

4) html:5 doesn’t work inside html files. Should I remove default sumlimetext packages for html and css?
On tab no effect, on alt+e it removes “html:5” and gives nothing.

5) How do I add for html snippet, extra edition point for #:

'a': '<a href="#"></a>'

Like ${1:#} (if we don’t change, it will keep #, else it should replace #)

6) Seems there are snippets and abbreviations for html, and none of them work on tab key? How to make them work for this key?

Thanks.

0 Likes

#64

sublimator, some of the items are bug reporting…

0 Likes

#65

sublimator, what about the most important, in html nothing from zen-coding works on tab?

0 Likes

#66

this plugin is very buggy.

example - you get some big piece of code through ctrl+alt+enter command, then remove a half and… you have to press on Tab key dozens of times while counter for removed code will not be switched off.

the problem is about editing points for snippets, plugin doesn’t know that sometimes I don’t use them, so it always gives me an extra job - press on Tab and see that nothing changes (it jumps from removed editing point to another one removed, lol), you can feel yourself like an idiot. This bug is like a bunch into the sky.

0 Likes

#67

Wow, I just tried the new version on Bitbucket
bitbucket.org/sublimator/zencoding/

That’s way better sublimator! All the bugs seem fixed and it’s way faster it seems. Thank you!!!

0 Likes

#68

sublimator, dude, snippets like .class { type something and press tab; } don’t expand (when there is no new line).

also, when I have

|
and press Enter, its better to expand to

[code]


|
[/code] (with tab)

Not to

[code]


|
[/code]

similar to all block-level elemetns.

one more important bug - abbreviations and snippets expand only when you type shortcut without remarks. So, if you type fser and then remark it with fset, tab won’t work for this. But alt+e works.

0 Likes

#69

no, I’m using fixed 1.2.2 version (without last changes).

with extra keymap file inside A folder (zencoding/a/Default.sublime-keymap). Source of this file:

<bindings> <binding key="/[A-Za-z0-9#.&gt;+*:$_!@-]+/,tab" command="zenHTML $1" uuid="59b1aa64-38c6-11df-84d2-00037af1a101"> <context name="selector" value="text.html - source - meta.tag, punctuation.definition.tag.begin, meta.scope.between-tag-pair.html"/> <context name="allSelectionsEmpty" value="true"/> <context name="allPreceedingText" value="(^|\s*)[A-Za-z0-9#.&gt;+*:$_!@-]*$"/> <context name="noFollowingText" value="\S"/> <context name="hasNextField" value="true"/> </binding> <binding key="/[A-Za-z0-9#.&gt;+*:$_!@-]+/,tab" command="zenHTML $1" uuid="59b1aa65-38c6-11df-a961-00037af1a101"> <context name="selector" value="text.html - source - meta.tag, punctuation.definition.tag.begin, meta.scope.between-tag-pair.html"/> <context name="allSelectionsEmpty" value="true"/> <context name="allPreceedingText" value="(^|\s*)[A-Za-z0-9#.&gt;+*:$_!@-]*$"/> <context name="hasNextField" value="false"/> </binding> </bindings>

so the shortcuts like “ul>li*8” now work for me by Tab. If I move these bindings to default keymap file (its be default), they work only by alt+e.

can you fix please cursor point for block-level elements? Like

[code]


|
[/code]
0 Likes

#70

Zen Coding doesn’t work on sublimetext2?

0 Likes

#71

New plugin system isn’t it.

0 Likes

#72

Hey I really like this plugin and appreciate the effort put into it, I just have a couple of things I’d love to be able to change

I’ve been digging around the source and I cannot find how to alter a couple of things

  1. I’d like to be able to remove the space that’s inserted between the css value ie. when expanding fl:l -> float: left; i would prefer fl:l -> float:left; and also when doing a straight expand ie. fl: -> float:| (| representing the cursor position)

  2. Also i’d prefer to be able to modify the css expand so that it doesn’t automatically add a newline with indentation on expanding

  3. One thing I have noticed with F1 list for CSS is that it searches all values, and not from the beginning of the line, this means that you can’t get to certain elements (try searching for “p”) minus quotes and you’ll see what i mean

  4. Also bug? fz expands to fz-index: and not font-size?

thanks

0 Likes

#73

I would love to see Zen Coding support in Sublime as it’s the one thing holding me back from switching from Komodo :smile: you sure we can’t tempt you to keep the working going some how?

I’m sure a few of us would be more than happy to donate some £££’s for your hard work, least I know I would!

0 Likes

#74

[quote=“sublimator”]Here’s a quick hack port of Zen to s2 ( see attached zip ) I did last week. ( see attached zip )

It will ** likely ** be buggy. Only windows keymap is setup etc. Commands are missing. Hasn’t really been tested ( I don’t use X yet )

Be aware that default snippet bindings will take priority over normal bindings.

Dunno when I can look at it properly.[/quote]

I placed the package in it’s right place, but I’m still not able to get ZenCoding to work for S1 or 2. Does anyone know if “ctrl+,” is still used to expand in S1 or 2?

0 Likes

#75

[quote=“sublimator”]The posted zip was for S2 only.

Most commands (expand, balance tag etc) work here for me. Shrug.

It should just be abbrev->tab.

If it’s not working for people maybe I’ll just remove the zip to avoid wasting time.[/quote]

It works for me!

0 Likes

#76

[quote=“sublimator”]The posted zip was for S2 only.

Most commands (expand, balance tag etc) work here for me. Shrug.

It should just be abbrev->tab.

If it’s not working for people maybe I’ll just remove the zip to avoid wasting time.[/quote]

I’m using the latest S2 alpha. I typed in

div#content>p

And then pressed [TAB], but nothing expanded. And I’m sure I have it placed correctly. Am I missing something?

0 Likes

#77

[quote=“sublimator”]

etc . Commands are missing. Hasn’t really been tested ( I don’t use X yet )

Are you on *nix. You’ll have to copy the keymap?[/quote]

*nix? unix? linux? No. I’m on Windows 7 x64.

0 Likes

#78

does it work stable on last sublimetext?

0 Likes

#79

Thanks for taking the time to convert this to ST2 sublimator :smiley: This should be built into ST imo.

I can’t get the CSS help menu to show up with F1 anymore. Is it still there? I’m on windows 7 64bit.

0 Likes

#80

Also how would I get the css commands to work on .less files?

0 Likes