| These docs are best viewed at https://dnut.github.io/Rewrap |
|
For VS Code,
Open VSX and
Visual Studio. Latest stable version 1.16.3 / pre-release 17.x / changelog |
Rewrap Revived
Rewrap Revived is a Visual Studio and VS Code extension that is used to hard-wrap code comments to a configured maximium line length. This is a fork of the unmaintained Rewrap extension by Steve Baker (@stkb).
The main Rewrap command is: Alt+Q. With the cursor in a comment block, hit this to re-wrap the contents to the
specified wrapping column.
Features
- Re-wrap comment blocks in many languages, with per-language settings.
- Smart handling of contents, including Java-/JS-/XMLDoc tags and code examples.
- Can select lines to wrap or multiple comments/paragraphs at once (even the whole document).
- Also works with Markdown documents, LaTeX or any kind of plain text file.
The contents of comments are usually parsed as markdown, so you can use lists, code samples (which are untouched) etc:
Installation
Rewrap Revived is available in both the Microsoft marketplace and the OpenVSX marketplace.
Please install the pre-release version. That way, you can identify any bugs and report them, so they don't make their way into the stable release. If you do observe a bug, then you can switch to the stable release, and rest assured that the bug will not be introduced there, since you have reported the issue (unless of course, it is already present in both releases).
Contributing
To build and test locally, run ./do build and ./do test. See the
contributing guide for full development workflow
documentation including prerequisites, manual testing, and publishing.
Selections
- If you select just a couple of lines, only those lines will be processed.
- In VS Code you can use multiple selections (alt+click) to select multiple comment blocks or line ranges.
- However you can safely select a large line range with multiple comments and code, and
only the comments will be wrapped (the code is untouched). You can
Ctrl+A, Alt+Qto re-wrap a whole document at once.
Next
See the following pages on configuration of settings and keybindings, and extra features.