In notepad++ zen coding has a pretty good key binding: next edit point [Ctrl+Alt+Right].
What is the key binding for “next edit point” in ST2?
Zen Coding ( CSS Snippets )
It’s “ctrl+period”. All bindings are defined here: Packages/ZenCoding/Default (Windows).sublime-keymap
Hi all,
Apologies for not going through all 33 pages in this discussion but I can’t figure out to expand an abbreviation using Zen Coding in ST2.
I’ve put the following:
ul>li*5
And pressed all combinations of keys that I can find documented and listed online … nothing works. Works fine in Coda so I know the abbreviation is OK.
Can anyone help a complete ST2 n00b figure out the key combination to expand the above?
Thanks.
That didn’t do anything for me, although it is doing something it hasn’t done before.
When I type ul>li and press TAB, I get the following …
ul>
li
I know it’s valid as it works in Coda … even this works in Coda: div#hello>ul>li*5>a.link>span.link-inner
Sorry for sounding like I’m bitching, just really new to ST2.
[quote=“Anton_Rich”]
Where on the keyboard key “period”? Under the “escape”?[/quote]
The period is a full stop
Hello, sorry for not reading all the 35 pages.
I just discovered yesterday ZenCoding for Eclipse.
I wanted to setting it up on my text editor (sublime text 2 for windows)
I have followed all the instruction.
Install Package Control, then CTRL+MAJ+P => install package => Zen Coding.
The ZenCoding package is succesfully installed.
while i try to use it tipping this :
div#something>ul>li.item*6>a>img.something
then press TAB, i don’t get anything;
I try to google this issue and all the tuto stops after the installation of Zen Coding.
What am I doing wrong, i don’t get it !?
I can confirm this. Zen coding is a great thing, but so far the ST2 plugin is a bit hit or miss.
Using kopax’s example, div#something works as expected. But div#something>ul gives me
div#something><ul id="" class="">
<li><a href="" title=""></a></li>
li
</ul><!-- / -->
what the hell?
[quote=“handycam”]I can confirm this. Zen coding is a great thing, but so far the ST2 plugin is a bit hit or miss.
Using kopax’s example, div#something works as expected. But div#something>ul gives me
div#something><ul id="" class="">
<li><a href="" title=""></a></li>
li
</ul><!-- / -->
what the hell?[/quote]
div#something>ul>li.item*6>a*1>img.something
Give this a try. You have to be explicit with the a tag. It is a bit hackey but it works.
But why does this simpler version fail?
div#something>ul
or even div#something>p
[quote=“handycam”]But why does this simpler version fail?
div#something>ul
or even div#something>p
[/quote]
It probably has something to do with the ST2 tab triggers that are already built in. If you add *1 to the end of them they work as intended.
div#something>ul*1
or even div#something>p*1
[quote=“Anton_Rich”]
[quote=“Michael”]
The period is a full stop [/quote]
What?[/quote]
You asked where the period was on the keyboard? A period is the ‘full stop’ key, the character, with which, you end a sentence.<<<
Between the < and ? key
Does anyone know what happened to the period and # keys? whenever I used to press them it would give me class="" or id="", I thought it was a zen coding plugin thing… but it seems that doesn’t work anymore.
[quote=“Michael”]
You asked where the period was on the keyboard? A period is the ‘full stop’ key, the character, with which, you end a sentence.<<<
Between the < and ? key [/quote]
Thanks.
[quote=“kopax”]
Hello, sorry for not reading all the 35 pages.
I just discovered yesterday ZenCoding for Eclipse.
I wanted to setting it up on my text editor (sublime text 2 for windows)
I have followed all the instruction.
Install Package Control, then CTRL+MAJ+P => install package => Zen Coding.
The ZenCoding package is succesfully installed.
while i try to use it tipping this :
div#something>ul>li.item*6>a>img.something
then press TAB, i don’t get anything;
I try to google this issue and all the tuto stops after the installation of Zen Coding.
What am I doing wrong, i don’t get it !?[/quote]
What version of Sublime are you using, OS and version number?
I copied and pasted your zen code and get the following as I would expect :S
<div id="something">
<ul>
<li class="item"><a href=""><img src="" alt="" class="something"></a></li>
<li class="item"><a href=""><img src="" alt="" class="something"></a></li>
<li class="item"><a href=""><img src="" alt="" class="something"></a></li>
<li class="item"><a href=""><img src="" alt="" class="something"></a></li>
<li class="item"><a href=""><img src="" alt="" class="something"></a></li>
<li class="item"><a href=""><img src="" alt="" class="something"></a></li>
</ul>
</div>
[quote=“KmacK”]
[quote=“handycam”]I can confirm this. Zen coding is a great thing, but so far the ST2 plugin is a bit hit or miss.
Using kopax’s example, div#something works as expected. But div#something>ul gives me
div#something><ul id="" class="">
<li><a href="" title=""></a></li>
li
</ul><!-- / -->
what the hell?[/quote]
div#something>ul>li.item*6>a*1>img.something
Give this a try. You have to be explicit with the a tag. It is a bit hackey but it works.[/quote]
I had this a while back, a custom snippet was intefering/competing with zen coding. HTML auto completion perhaps?
Both your snippets work flawlessly for me (I am on a brand new ST2 with only ZenCoding installed)).
Those work great for me as well, but I have another issue…
Working in an HTML file, if I try and wrap a bunch of paragraphs with
tags by selecting them, pressing Ctrl+Alt+Enter and using p*
it converts any dollar signs with numbers in the paragraphs to blackslashes “”.
eg. This:
khasdkhasd $4 bazillion
khasdkhasd $4 bazillion
khasdkhasd $4 bazillion
Ctrl+Alt+Enter, P, *, Enter
Gives:
[code]
khasdkhasd \ bazillion
khasdkhasd \ bazillion
khasdkhasd \ bazillion
[/code] Instead of the expected:[code]khasdkhasd $4 bazillion
khasdkhasd $4 bazillion
khasdkhasd $4 bazillion
[/code] This happens for me in a clean installation of Sublime Text 2 Build 2181 x64 (portable package) that I installed Package Control in, restarted, installed Zen Coding using Package Control, restarted.Can anyone else replicate this, or better still suggest a fix/workaround?
Thanks
P.S. Windows 7 Pro x64
hi everyone
After update to the last stable version of sublime i noticed the strange behavior of zen coding
when i try to expand
“span.text” i expect to appear
<span class="text"></span>
but instead i get this line
span.text('some text')
Any ideas why this happening?
span.some-text expanded properly.
Here the console output:
command: insert_best_completion {"default": " ", "exact": false}
ZenCoding: on_query_completions prefix: u'text'
ZenCoding: on_query_completions abbr: u'span.text'
ZenCoding: on_query_completions expand_abbr abbr: u'span.text' result: u'<span class="text">${1001:$SELECTION}</span>'
PS sorry for my english