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.

Should snippets use $0? #262

@segevfiner

Description

@segevfiner

Prerequisites

Description

Some of the snippets look like this:

'#ifndef ${1:SYMBOL}\n#define $1\n\n${2}\n\n#endif /* end of include guard: $1 */\n'

I think you are supposed to use:

'#ifndef ${1:SYMBOL}\n#define $1\n\n$0\n\n#endif /* end of include guard: $1 */\n'

But I think this won't make a difference in Atom currently, since Atom doesn't implement the exact same behavior that TextMate has for $0. In TextMate & VS Code, $0 changes the final cursor position after you press tab on the final tab stop. If you have a snippet without $0 than the final tab press will move the cursor after the snippet. In Atom, the cursor will be left on the last tab stop when there isn't a $0 instead of moved to the end of the snippet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions