Using Visual Studio 2019, I found a really useful refactoring option in 'Quick actions and refactoring': (might comes from PowerTools, whatever)
I just wondered how:
For the later, a solution with Visual Studio Code would be perfect as well !
Thanks for your help
1. Go to File > Preferences > Setting (Windows) or Code > Preferences > Settings (macOS). 2. Type word wrap in the search field and you will see the search results immediately. 3. Select on from the drop-down. Your settings will be saved automatically. From now on, all documents opened by Visual Studio Code will wrap text and code by default.
Place your cursor in a parameter list. Press Ctrl +. to trigger the Quick Actions and Refactorings menu. Select Wrap every parameter to accept the refactoring. What: Lets you wrap binary expressions.
To eliminate those disappearing lines on the demo computer we use in the course, he turned on word-wrap for Visual Studio. This choice keeps all of the code on the screen by wrapping long lines of code back to the left hand margin. If you like that idea, it's easy to turn on that option.
Place your cursor in any of the call chains. Press Ctrl +. to trigger the Quick Actions and Refactorings menu. Select Wrap call chain or Wrap and align call chain to accept the refactoring. This refactoring applies to: What: Lets you wrap, indent, and align parameters or arguments.
You can try using Rewrap extension which formats code, comments, and other text to a given line length (80 by default).
The main Rewrap command is: Rewrap Code / Comment, by default bound to
Alt+Q
. Put the text cursor inside a comment line, block or plain text paragraph and invoke the command to wrap. You can also select just a few lines, or multiple comments in one selection.
There is currently an Open request for this in the VS Code Issue tracker on GitHub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With