Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Docstring Fold and UnfoldNew to Visual Studio Code? Get it now.
Docstring Fold and Unfold

Docstring Fold and Unfold

Daniel Sanchez

|
282 installs
| (2) | Free
Toggle fold state for python docstrings
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Docstring Fold and Unfold

Features

  • Automatically folds, unfolds and toggles Python docstrings in the active editor.
  • Supports both single-line and multi-line Python docstrings.

Commands

This extension provides the following commands:

  1. Fold Python Docstrings: Folds all docstrings in the current Python file.
  2. Unfold Python Docstrings: Unfolds all docstrings in the current Python file.
  3. Toggle Python Docstrings: Toggles the fold state of Python docstrings.

How to Use

  • Open any Python file with docstrings.
  • Use the command palette (Ctrl+Shift+P or Cmd+Shift+P) to run the commands:
    • Fold Python Docstrings
    • Unfold Python Docstrings
    • Toggle Python Docstrings
  • Alternatively, you can use the following keyboard shortcuts:
    • Fold Python Docstrings: ctrl+k ctrl+h
    • Unfold Python Docstrings: ctrl+k ctrl+g
    • Toggle Python Docstrings: ctrl+k ctrl+a

Installation

You can install this extension directly from the VSCode Marketplace by searching for Docstring Fold and Unfold.

Extension Settings

No additional settings required.

Known Issues

  • Performance may degrade with extremely large files.

Release Notes

0.0.1

  • Initial release of Docstring Fold and Unfold.

1.0.0

  • Keep the cursor and the screen position after folding/unfolding.

License

MIT License

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft