Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Trigger on context instead of tab? #36

Open
@oleander

Description

@oleander

I was hoping to implement this snippet in atom, but I can't find any support for triggering snippets based on context.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>content</key>
    <string>#{${1:$TM_SELECTED_TEXT}}</string>
    <key>keyEquivalent</key>
    <string>#</string>
    <key>name</key>
    <string>Embedded Code — #{…}</string>
    <key>scope</key>
    <string>B:(string.quoted.double.ruby|string.interpolated.ruby) - string source</string>
    <key>uuid</key>
    <string>EEE6D060-C5A0-400D-A2E0-0835013C5365</string>
</dict>
</plist>

It will expand # to #{} when inside a ruby string without hitting tab. The current migration tool doesn't seem to be able to do this. apm init --package . --convert https://github.com/textmate/ruby.tmbundle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions