Giter VIP home page Giter VIP logo

emmet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

emmet's Issues

Python 3 support

It would be great to update the Python code to support Python 3.0+. While Python 2 is still widely used, it just feels wrong writing new code in it.

I'll send a pull request if I get anywhere with upgrading it.

Add support for adding text

I would like it to be possible to set the inner text of an element via zen coding.
I can think of 2 good ways of doing this:

  1. css like:
    div#res[content=some_text]
    which might have problems with spaces
  2. new syntax:
    div#res{some text can go here}

I would try to implement it but it's hard for me to follow up the way ZC works

Name resolver

Next version of Zen Coding should allow users to skip obvious tag names from expression. For example, ul.nav>.item should be the same as ul.nav>li.item, tr>.cell as tr>.td.cell and so on. It should be a stand-alone module that can be used in extensions.

Preferences module

Create preferences module that provides general storage for Zen Coding module preferences and convenient methods for listing and modification

replace_variables call uses outdated settings dictionary

I discovered this problem while working on TEA for Espresso with Zen Coding 0.6. Say I wanted to switch to using a different language:

from zencoding import stparser
from zencoding import zen_core as zen
user_settings = {'variables': {'lang': 'ru'}}
zen.update_settings(stparser.get_settings(user_settings))

If I then run an abbreviation that uses the ${lang} variable, I'll still get 'en' (the default value) output. This is because the replace_abbreviation has the vars parameter pre-filled, and modifying the zen_settings variable after the fact doesn't change it. To fix the problem, I modified zen_core.py as follows:

Replacing lines 234-240
def replace_variables(text, vars=None):
"""
Replace variables like ${var} in string
@param text: str
@return: str
"""
if vars is None:
vars = zen_settings['variables']
return re.sub(r'${([\w-]+)}', lambda m: m.group(1) in vars and vars[m.group(1)] or m.group(0), text)

This way, zen_settings['variables'] is always the most recent version, and the user doesn't need to edit zen_settings.py to change them (they can instead override them).

Support different syntaxes for bem-like expanding

I think it's not good that .block>.-element is counted as .block>.__element by default — there could be people that would want to use this syntax, so the Zen Coding should be less strict on that, however it would nice to have this behavior in settings.

Also, right now .block--mode is expanded to <div class="block--mode"></div>, however there are people that use this as modifier (like Nicolas Gallagher mentioned in his article), so it would be nice if .block--mode was treated like .block.block--mode as .block_mode works now.

However, I think that all those things must be configurable in settings, so someone could say that .-- is an element or the .__ is a modifier.

A few bugs to report

The match_pair action function defined in zen_actions.py contains a bug, referencing attributes on a tag with getitem syntax, eg tag['start']. The Tag class in html_matcher.py actually has 'start' as an attribute.

There's also a bug in the the format-css.py code, where the regex will deform the '{%::zen-caret::%}' when trying to put some whitespace between "prop: value"

ps. Thanks for ZC!

TextMate plugin error

в плагине к TextMate нехватает zencoding внутри .tmbundle/Support/

Add support for Sublime Text 2

I love zencoding, love ST2, but they never seem to get past the first date. He buys her flowers, she says no, etc etc.

Please, help them get married and have lots of high-efficiency text-editing babies. Please.

вложенные элементы в |bem фильтре

некорректно раскрывает аббревиатуру span>a.__child:
<span><a href="" class="container container_child"></a></span>

.__child раскрывает правильно:
<a href="" class="container__child"></a>

filters package in zencoding causing import problems

The zencoding package is placed in one of my plugin folders. Importing zen_actions and zen_core works fine. The problem arises when either of this packages try to import zencoding.filters. So I spent the better part of yesterday trying to figure out what's going in. I latter discover some magic going on in filters.init.py. Don't fully understand it or why it's needed, but it's cause import problems. In fact, I can't import zencoding.filters. Strange and unusual since I don't have this problem with any other python package. I suspect the magic going on in filters.init.py is going to break my python packages.

Also in zen_actions.py, why are you import zencoding to get zen_core when both zen_core and zen_actions are in the same package? You are doing:

from zencoding import zen_core as zen_coding
from zencoding import html_matcher

when you could just do

import zen_core as zen_coding
import html_matcher

Anyway this import problems are cause problem in my application. Do I need to do a global import somewhere to avoid these problems? Am I missing something?

|t (trim) filter does not remove number markers inside custom attributes

Performing this abbreviation ol>li*>span{$#}+{ }+a[title=$#]{$#}|t on the following:

  1. list item one
  2. list item two
  3. list item three

produces this output:

<ol>
<li>
<span>list item one</span>
<a href="" title="1. list item one">list item one</a>
</li>
<li>
<span>list item two</span>
<a href="" title="2. list item two">list item two</a>
</li>
<li>
<span>list item three</span>
<a href="" title="3. list item three">list item three</a>
</li>
</ol>

Note that the |t (trim) filter did not remove the number marker inside the custom title attribute [].

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Read abbreviations from css

Hi,

Here is my suggestion:

Read abbreviations from css file/css rules.
With this feature users can define one css lib and reuse code.

Like this:

#something{....}
    #something > ul{....}
        #something > ul > li {....}
            #something > ul > li > a{....}

Then i can use:

something

And expand to:

<div id="something">
    <ul>
        <li><a href=""></a></li>
    </ul>
</div>

I know that need more specs about how this works, and don't know if is possible (without years codding).

Plugin error in TextMate

The textmate expansions are throwing an error:

Traceback (most recent call last):
File "/Users/numan/Library/Application Support/TextMate/Pristine Copy/Bundles/Zen Coding.tmbundle/Support/expand_abbreviation.py", line 7, in
import zencoding
ImportError: No module named zencoding

What am I doing wrong?

Delegates for “Reflect CSS Value”

“Reflect CSS Value” action should be able to handle custom “reflect” delegates, available for extension. Particularly, gradient generator should provide its own delegate.

TextMate : No module named zencoding

Hi,

I have an issue when trying to expand my zencode, it writes down in textmate :

Traceback (most recent call last):
Traceback (most recent call last):
File "/Users/franco/Library/Application Support/TextMate/Bundles/Zen Coding.tmbundle/Support/expand_abbreviation.py", line 7, in
import zencoding
ImportError: No module named zencoding

Anybody knows what is wrong ?

Non existing vendor prefixed CSS properties

There is no -ms-box-shadow and no -ms-border-radius so it does not make sense to include those in the snippets for "bsha" and "brad". I would also suggest to use "bxsh+" and "brds+" to make it more consistent with other existing abbreviations and conventions.

Please extend the Zen Coding XSL shortcuts to include all xsl elements

The XSL shortcuts need to be extended to include ALL xsl elements.

Here's a few of suggestions that I thought would be a great and helpful addition to the xslt shortcut library...

tex --> xsl:text/xsl:text

com --> xsl:comment/xsl:comment

attr-set --> <xsl:attribute-set name="" use-attribute-sets="">/xsl:attribute-set

imp --> <xsl:import href=""/>

inc --> <xsl:include href=""/>

key --> <xsl:key name="" match="" use=""/>

Filter for JSON

It'd be great if zen-coding could expand not only HTML etc., but JSON as well.

For example, from something>another{content}+lalala+lololo{blah} you could get

{
    "something":
    [
        {
          "another": "content"
        },
        {
          "lalala": |
        },
        {
            "lololo": "blah"
        }
    ]
}

or something similar.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Expand Abbreviation not working the same after recent update

I've set my Aptana to look for updates on every startup with the url http://zen-coding.ru/eclipse/updates/. About 3 weeks ago I received an update through the http://zen-coding.ru/eclipse/updates/ site. After the update it's not working exactly the same anymore. I've only noticed one thing so far. I've setup some custom snippets.

If I type in blank and try to expand it should expand to target="_blank".
This works except for if I try this <a href=""blank|> where my cursor is the pipe. I try to expand and it does nothing.

NOTE: PIPE IS MY CURSOR LOCATION
doesn't work but used to
<a href=""blank|>
<a href="" blank| >
<td blank|>
does work
<a blank|href="">

This worked fine before the update. I can type it anywhere else and it works as long as its not within an html tag.

Below are the details from Aptana from the installation details screen
CURRENT VERSION
Zen Coding for Eclipse 0.8.0.201201232221 ru.zencoding.eclipse.feature.group
VERSION BEFORE UPDATE tried to revert but couldn't because 0.7.0 wasn't available
Zen Coding for Eclipse 0.7.0.201103132329

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.