Skip to content

Leverage TM_SELECTED_TEXT #565

Open
Open
@oiiiiiiii

Description

@oiiiiiiii

I think the snippets could be greatly improved by using the $TM_SELECTED_TEXT functionality more. E.g. by changing the javascript if snippet

    "If Statement": {
        "prefix": "if",
        "body": ["if (${1:condition}) {", "\t$0", "}"],
        "description": "If Statement"
    },

to

    "If Statement": {
        "prefix": "if",
        "body": ["if (${1:condition}) {", "\t${0:$TM_SELECTED_TEXT}", "}"],
        "description": "If Statement"
    },

That way it would be easier to wrap a peace of code with the if expression. Same could be done with for, while, elif, function, etc. snippets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions