Questions and Answers on any aspect of .NET. Now closed.
I'm sure this is lunacy but I would like my subs (controls specifically) to be automatically formatted as below when I double click on a control on a form.
Private Sub tsbUpdate_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles tsmUpdate.Click, _
As opposed to the line to infinity that you get now.
Any thoughts? Macro maybe?
I'd be interested in the answer to this too. Just formatting it the desired way once won't do. When editing VB files, VS2005 has a tendency to reformat whatever line the cursor is on according to its rules. That plays hell with version control when you're dealing with a codebase that wasn't originally built in VS2005.
Saturday, January 05, 2008
I don't know the answer, but do know that it is likely to be complicated. The "pretty printing" code in Visual Studio is directly related to the compiler itself somehow.
Paul Vick, one of the Program Managers for Visual Basic, wrote a couple of blog posts a while back, where he mentioned that he had to "bootleg the compiler" to make the pretty lister behave differently.
Sunday, January 06, 2008
Sorry for the slow reply, I was out on vacation...
Right now, the pretty lister is not controllable -- the rules are built directly into the compiler and cannot be changed without changing the compiler itself. It's an interesting idea to allow the pretty lister to be more user-modifiable, but that'd be something for the future. It can't be done right now...
Thanks for using VB!
Wednesday, January 23, 2008
This topic is archived. No further replies will be accepted.Other recent topics
Powered by FogBugz