Skip to content

improved folding in various cases #715

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

Merged
merged 7 commits into from
Feb 6, 2017
Merged

improved folding in various cases #715

merged 7 commits into from
Feb 6, 2017

Conversation

fmv1992
Copy link
Contributor

@fmv1992 fmv1992 commented Nov 18, 2016

Improved folding.vim file to handle a couple of cases:

  • Docstrings get folded even if not directly on the line below a def statement:
def such_a_long_indented_function_could_not_fit_in_one_line(
        arg1=None,
        arg2=None):
    u""" This is my docstring.

    This multiline docstring will be folded.

    """

    s = ''' This simple string
        will not be folded as a docstring. '''

    """ This comment will also be folded

        be folded as a docstring.

    """
  • Improved docstring flexibility: u""" and """ and ''' and u''' are recognized as possible docstrings.

  • Commented the code for improved readability

  • Added a couple of exceptions falsely triggering folding such as @author (a common string in a comment) being recognized as a decorator

@fmv1992 fmv1992 merged commit d113cff into python-mode:develop Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant