3

Is it possible to change the width of the text editor in VS2012 - I've got a fairly wide screen and use fairly small text so I end up with a lot wasted real-estate in the middle of my screen.

I don't want to turn off word wrap - I just want the wrap to start further right on the line. If that makes sense!?

Dave
  • 3,581
  • 1
  • 22
  • 25
  • The question is really unclear. In my case the word wrap is always done on the whole text window width. Is it done sooner for you? The text window takes all of my VS space (all toolbar autohiding). Can you perhaps post a screenshot of your screen to explain what you want? – Suma Apr 08 '13 at 07:58
  • 3
    Related: http://stackoverflow.com/questions/236517/how-can-i-make-visual-studio-wrap-lines-at-80-characters – Suma Apr 08 '13 at 08:01

4 Answers4

2

You can set this with HTML in Visual Studio 2012 but there is no global setting and it's missing in quite a few languages.

enter image description here

Jaxidian
  • 13,081
  • 8
  • 83
  • 125
1

You can just put another "dummy" window next to the one you are writing in, so the actual editor window will be smaller. You can put it on the left if you want to pan the text to the right, and to the right if you want to shorten the lines.

Bartek Banachewicz
  • 38,596
  • 7
  • 91
  • 135
  • That's not what I'm after; I don't want to introduce new windows, I want the max line length in the current editor window (the value used when you auto-word-wrap) to be increased. – Dave Apr 08 '13 at 07:48
  • That isn't a very good idea. Using extremely long lines in programming is not recommended, you should stick to something like 80-100, so people with smaller screens could read it too. – Bartek Banachewicz Apr 08 '13 at 08:10
1

I actually found the answer elsewhere; VS doesn't appear to provide this functionality but Resharper does. Resharper -> Options -> Code Editing -> C# -> Formatting Style -> Line Breaks and Wrapping -> Right margin (columns)

I put mine to 200 which fixed the issue

Dave
  • 3,581
  • 1
  • 22
  • 25
0

I know that this is not what you are looking for, but I believe it solves the same problem. I too have a fairly large screen and try to make use of it as optimally as possible.

I hate tabbing between code or design tabs and try to avoid that as much as possible.

VS has a feature that permits the user to create Horizontal or Vertical Tab groups and ever since I have started using it, I have found it very helpful. These options are present in the context menu by right clicking the tab or in the VS Window Menu (Menus are seen only if the tab groups feature is not active).

I have created a screenshot with Vertical Tab Groups created as shown below. In this example, I have a overview of both the designer and the code view at the same time.

enter image description here

We can use tab groups whenever there is a dependency such as comparing code, redesigning a module, etc. I know it takes a little time to get used to this feature but try it out and see :)

Patrick D'Souza
  • 3,491
  • 2
  • 22
  • 39