Firstly apologies that this repo has been neglected the last couple of months and thanks for all issues and requests submitted. Apart from some other real life issues, I have been working on a new version of Rewrap.
The next version will support VSCode and Visual Studio (#36) together from the same new codebase.
Because of the large changes, I'm putting this version out as a beta first for testing.
The main change is that all comments are now parsed as Markdown*. Markdown is increasingly being used in documentation comments in various languages, and this adds support for bulleted/numbered lists (#28), as well as other features.
*(except .Net XmlDoc comments, which are parsed as xml)
But what if some parts of your comments are still getting messed up by Rewrap? (#29)
New setting: wholeComment
: (true/false)
This setting affects whether the whole comment is re-wrapped, when a cursor (empty selection) is inside it. With this set to true
, the whole comment is wrapped. This is how Rewrap has behaved until now.
However with wholeComment
set to false
, only the containing paragraph is wrapped and the rest of the comment is left untouched.
This is maybe how it should have worked from the beginning and so in the new Visual Studio extension I'm trying the default as false
. However in vscode, the default will be true
for consistency with previous versions, and users can set it to false if they wish.
New setting: tidyUpIndents
: (true/false) [Experimental]
Turning on this experimental setting will tidy up paragraph indents when re-wrapping. For more information see here.
Like everything else, these settings are configurable on a per-language or project basis.
Other issues fixed in this version: #32, #33, #34, #37, #38
VSCode version
rewrap-1.4.0-beta1.zip
To install:
- Download the .zip file and rename it to a .vsix file
- In vscode, go the the extensions panel (ctrl+shift+x)
- You must uninstall version 1.3.0 first and then restart vscode
- Go back to the extensions panel and from the (…) menu, choose "Install .vsix file…" and choose the .vsix file
Visual Studio version
I haven't written a Visual Studio extension before and it's pretty involved, so this version is still rough around the edges, but the core functionality is the same. The main limitation at the moment, is the inability to set settings per language/document type. Also VS doesn't support multiple selections or rulers natively so I'm looking into options for that.
Versions supported are VS 2015 and 2017 (tested on community editions)
Rewrap.VS.0.1.zip
To install:
- Download the .zip file and rename it to a .vsix file
- Run the .vsix file
Using:
- The entry "Rewrap Lines" is added to the Edit menu. It's bound by default to Alt+Q
- Options are under Tools -> Options -> Environment -> Rewrap
Thanks to all