Line length

Hi,

I can't find the option to set the maximum line length and display the print margin. I would also like to know if the auto-formatter automatically reorganizes the code so it doesn't exceed the line length

Can someone help  


Answer this question

Line length

  • Frank Gervais

    You can enable word-wrap but I don't think the effect is terribly satisfying for code -- it's more intended for HTML and XML.

    Displaying print margins is completely impossible. If you're looking to pretty-print your source code I recommend you search for a third-party solution as Visual Studio's printing feature is extremely rudimentary.

    However, you can enable "editor guidelines" at a specific character position to help you wrap your code manually. Unfortunately, this requires a registry hack. Microsoft's Sara Ford posted the directions in her weblog:

    http://blogs.msdn.com/saraford/archive/2004/11/15/257953.aspx


  • voss

    hmm that's a shame. eclipse really shines with it's auto-formatting. can we expect something like that in the next releases of c# express

    thanks anyway :)

  • MrTibs

    I don't know if any enhancements are planned in this direction -- I already submitted a request to make those editor guidelines an "official" feature but MS replied that wouldn't make it into the next release.

    You can submit any other feature requests you have at the Product Feedback Center, though:

    http://lab.msdn.microsoft.com/productfeedback/

    And here's my editor guidelines request, in case you want to vote for it:

    http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx feedbackid=0dbfada2-4dc3-4be9-9250-dd82b1504fe0

  • Line length