How can I toggle word wrap in Visual Studio?

2019-01-10 00:37发布

Does Visual Studio .NET have a way to toggle word-wrap on and off?

I am used to this feature in Eclipse which allows you to right click and toggle word wrap on and off so that when you have long lines that extend out to the right, you don't have to move the bottom scroll bar right and left to read your code/html: http://ahtik.com/blog/2006/06/18/first-alpha-of-eclipse-word-wrap-released/

9条回答
Viruses.
2楼-- · 2019-01-10 00:43

In Visual Studio 2005 Pro:

Ctrl + E, Ctrl + W

Or menu EditAdvancedWord Wrap.

查看更多
姐就是有狂的资本
3楼-- · 2019-01-10 00:44

In Visual Studio 2008, CTRL+E+W.

查看更多
女痞
4楼-- · 2019-01-10 00:45

As of Visual Studio 2013, the word wrap feature is finally usable—it respects indentation. There's still a couple of issues (line highlighting, selection), but it's worth using. Here's how

enter image description here

查看更多
老娘就宠你
5楼-- · 2019-01-10 00:47
  1. Open the output window.

  2. Look for the little icon on the very right-hand side of the toolbar that starts with the text "Show output from:" in it. It looks like a small window with a carriage return icon. When you hover over it Visual Studio should display "Toggle Word Wrap" near your mouse pointer.

  3. Click that icon.

You now have learned something that was so painfully obvious I feel embarrassed for not knowing this long ago and thus have chosen to pay my dues and share my answer with others so they don't suffer the same agony I have.

Seriously, this is really useful for those with small screens. I have a small Lilliput USB monitor that is good for small tool windows, Skype IM, etc. It works great for putting the output window on, except that it sucks having to always sideways scroll. After just putting up with sideways scroll for months I finally decided to see if I could make it word wrap. The answer was so easy but the amount of time/effort it saves is tremendous.

查看更多
成全新的幸福
6楼-- · 2019-01-10 00:50

In Visual Studio 2008 it is Ctrl + E + W.

查看更多
Emotional °昔
7楼-- · 2019-01-10 00:51

In Visual Studio 2017 Edit -> Advanced-> Word Wrap OR Ctrl + E + W

查看更多
登录 后发表回答