When I copy or cut collapsed code and paste it somewhere else, the code gets expanded. Is there any way to make Visual Studio to retain the collapse/expand state when copy/cut/pasted?
I'm hoping that I can rearrange methods order quickly by cutting and pasting while all the implementaion details are nicely collapsed.
I'm working on VS2008 (C#) right now, but any tip on VS2010 is also appreciated.
I don't know of doing what you are asking, but if you currently use Resharper (or are interested in trialing or buying it) then it includes a File Structure window in which you can easily change the order of class members, classes themselves and regions simply by dragging them around.
In addition it adds keyboard shortcuts for moving whole methods up and down within a type.
Beyond these simple rearrangement functions, it also has a wealth of refactorings for moving methods within the type hierachy, extracting interfaces, &c.
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