hdima / python-syntax

Python syntax highlighting script for Vim
http://www.vim.org/scripts/script.php?script_id=790
MIT License
364 stars 109 forks source link

""" or ''' as comments #7

Closed nbari closed 7 years ago

nbari commented 11 years ago

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=/'''/

hdima commented 11 years ago

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.

jakar commented 8 years ago

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.