I have three related questions.
Prescript: I do have my curly brace line wrapping set to K&R style (at the end of the previous line) but that shouldn't be a material part of this, as whatever style is set in VS and Re#er should take over.
Let's say an existing method looks like this:
IEnumerable<ITransactionProcessingResult> ProcessTransactions(TransactionProcessingMethod method, IEnumerable<ITransaction> transactions, ISplineReticulator reticulator, AuthorizationToken authorizationToken) { return null; }
What keyboard shortcut or menu option in Visual Studio 2015 (with ReSharper 10.0.1 installed) can I use to trigger "chopping" the parameter list so it automatically gets formatted like this? I already know about the options in VS and ReSharper that format long lines as one is typing—that's not what this is about. I'm looking for a keyboard shortcut to use: when my cursor is in the parameter list, I can press it to cause the parameters to toggle back and forth between one line and multiple lines.
IEnumerable<ITransactionProcessingResult> ProcessTransactions( TransactionProcessingMethod method, IEnumerable<ITransaction> transactions, ISplineReticulator reticulator, AuthorizationToken authorizationToken ) { return null; }
Is there anything similar that can trigger the reverse, of collapsing multi-line "chopped" parameters to a single line?
Is there anything similar for method calls and their arguments, both chopping and unchopping?
I have searched through keyboard shortcuts in Visual Studio, and have searched online for VS and Resharper shortcuts but can't seem to find this option. Perhaps a custom script will need to come to the rescue...
P.S. I use the term "chop" because this is what the formatting options in ReSharper call it in the option "chop long lines". However, this action occurs only according to internal rules during certain text editing actions, and doesn't kick in on code that is already written and is not being edited.
A trick of editing, such as overtyping or deleting and retyping a character, that does cause this in at least some situations would be a useful stopgap measure, but I'm really looking for keyboard shortcuts.