Skip to content

Render Python docstrings as comments #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

viniciusban
Copy link

@viniciusban viniciusban commented Jun 7, 2018

Usually docstrings are used to document modules, classes, methods and functions.

So, I decide to render them as comments (italics in my vim theme).

@nfnty
Copy link
Member

nfnty commented Jul 7, 2018

This will highlight all multiline strings as comments. Python function docstrings are just regular strings that are parsed differently. You'll need some clever regex to be able to tell normal strings from docstrings, which will increase load times etc. As is, this is not okay.

@wmvanvliet
Copy link

Seeing how docstrings take up a very large part of my screen and therefore have a huge impact on how my code looks, I would very much welcome the ability to highlight them as comments, even if that means all multiline strings would be rendered as such.

How about adding a configuration flag g:python_multiline_string_as_comment to toggle the behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants