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.

Special characters in snippets #154

@kankaristo

Description

@kankaristo

I'm trying to create snippets for documentation comments/docstrings.

For example, I'd like to create the following snippet for C++:

'.source.cpp':
  'C++ docstring':
    'prefix': '/**'
    'body': """
      /**
       * $1.
       *
       * @param $2  $3.
       *
       * @return $4.
       */
    """

However, the special characters in the prefix seem to break the snippet (it doesn't show up in autocomplete). At first I thought it might be because /* starts a comment, but changing the prefix to something like *** is also broken.

Changing the prefix to doc works, but if I set it to something like doc***, it breaks after typing the first * character.

I also tried escaping the characters with \ or \\, but neither of those helped. Any way to make this work? Is this a limitation in snippets or autocomplete-plus (or autocomplete-snippets)?

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