GithubHelp home page GithubHelp logo

Comments (4)

ttscoff avatar ttscoff commented on May 26, 2024

Don't know if it helps, but the way the TextMate bundle for Zen Coding is set up, I can have whatever I want as a trailing tab trigger and it's ignored when the line is processed. I'm just using a comma (,) as the trigger now, so I end a zen coding string with a comma and hit tab…

from tea-for-espresso.

onecrayon avatar onecrayon commented on May 26, 2024

Thanks, I'll take a look at the Textmate implementation! Having a comma-tab (or similar) tab completion that then parses the word before the comma is an interesting idea.

from tea-for-espresso.

3zzy avatar 3zzy commented on May 26, 2024

Checking to see if there's any progress on this functionality? I've been using zen-coding tab-triggers on Textmate for months now but miss the auto-complete. My demo will expire shortly, would love to see this working ASAP. Many thanks!

from tea-for-espresso.

onecrayon avatar onecrayon commented on May 26, 2024

Unfortunately, I'm not going to be able to get this done in the next few days. If you'd like to try the comma-delimited tab trigger, though, here's how to set it up:

  1. Enable custom user actions in Actions->TEA->Preferences

  2. Create this XML file:

    ~/Library/Application Support/Espresso/Support/TextActions/Actions.xml

With these contents:

<?xml version="1.0"?>
<action-recipes>
    <action id="com.onecrayon.TextActions.ExpandTabTrigger" category="actions.text.HTML/tea.insertion">
        <class>TEAforEspresso</class>
        <title>Expand Tab Trigger</title>
        <text-trigger>,</text-trigger>
        <setup>
            <action>word_to_snippet</action>
            <options>
                <dict>
                    <key>default</key>
                    <string>&lt;$SELECTED_TEXT>$1&lt;/$WORD>$0</string>

                    <key>extra_characters</key>
                    <string>_-#.>+*:$!@</string>

                    <key>mode</key>
                    <string>zen</string>

                    <key>undo_name</key>
                    <string>Expand Tab Trigger</string>
                </dict>
            </options>
        </setup>
    </action>
</action-recipes>

Relaunch Espresso twice and you'll be able to type any zen coding snippet followed by comma+tab and it'll expand just like if you'd hit control-comma.

I'd still like to get zen-coding's abbreviations as full tab-triggers (no comma needed), so I'll let you know if/when that makes it into the main TEA plugin.

from tea-for-espresso.

Related Issues (20)

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.