Skip to content

""" or ''' as comments #7

Closed
Closed

Description

@nbari

how to mark starting and ending strings with """ or ''' as comment

currently as a workaround I added the following to the .vim/after/syntax/python.vim file

syn region Comment start=/"""/ end=/"""/
syn region Comment start=/'''/ end=/'''/

Activity

  1. hdima commented on Aug 31, 2013

    @hdima
    Owner

    Currently the only way to do it is by renaming pythonString, pythonBytes, pythonUniString, pythonUniRawString and pythonRawString groups with the corresponding delimiters and then link new names to the Comment group.

  2. jakar commented on Oct 7, 2016

    @jakar

    This can be done more easily with PR #55. Link pythonStringMultiline, pythonRawStringMultiline, and so on to the Comment group.

    Alternatively, you could highlight/link those differently than both strings and comments. I do that to make docstrings stand out.

  3. added a commit that references this issue on Apr 3, 2018
    f7105bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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