How can I toggle word wrap in Visual Studio?

前端 未结 11 1900
失恋的感觉
失恋的感觉 2020-11-29 15:17

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 o

相关标签:
11条回答
  • 2020-11-29 16:09

    keyboard shortcuts in visual studio

    (alt + z) => toggle word wrap

    0 讨论(0)
  • 2020-11-29 16:10

    I use this feature often enough that I add a custom button to the command bar.

    1. Click on the Add or Remove Buttons -> Customize
    2. Click on the Commands tab
    3. Click Add Command...
    4. Select Edit (or Edit|Advanced for newer VS versions) from the list
    5. Find Toggle Word Wrap and drag it onto your bar
    0 讨论(0)
  • 2020-11-29 16:15

    Following https://docs.microsoft.com/en-gb/visualstudio/ide/reference/how-to-manage-word-wrap-in-the-editor

    When viewing a document: Edit / Advanced / Word Wrap (Ctrl+E, Ctrl+W)

    General settings: Tools / Options / Text Editor / All Languages / Word wrap

    Or search for 'word wrap' in the Quick Launch box.


    Known issues:

    If you're familiar with word wrap in Notepad++, Sublime Text, or Visual Studio Code, be aware of the following issues where Visual Studio behaves differently to other editors:

    1. Triple click doesn't select whole line
    2. Cut command doesn't delete whole line
    3. Pressing End key twice does not move cursor to end of line

    Unfortunately these bugs have been closed "lower priority". If you'd like these bugs fixed, please vote for the feature request Fix known issues with word wrap.

    0 讨论(0)
  • 2020-11-29 16:15

    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

    0 讨论(0)
  • 2020-11-29 16:15

    In Visual Studio 2005 Pro:

    Ctrl + E, Ctrl + W

    Or menu EditAdvancedWord Wrap.

    0 讨论(0)
提交回复
热议问题