How to make word wrap respect indentation in Visual Studio?

落爺英雄遲暮 提交于 2019-12-07 04:53:06

问题


Visual Studio has a word wrap feature, but frustratingly it ignores line indents, making the text hard to read. Other text editors (Notepad++, Sublime Text) simulate the indentation of wrapped lines, making code easier to read

How can I make Visual Studio 2012 wrap lines intelligently? Smartly?

See in Notepad++, 'of beer' is wrapped appearing in line with Console

Where as in Visual Studio, 'bottles of beer' juts out into the indentation, making the code shape hard to read.


回答1:


Good news: In Visual Studio 2013, word wrap properly respects indents!

However there's a number of remaining issues with it (eg. around the Home/End keys). Please vote at https://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/5574507-fix-behaviour-of-home-end-keys-when-word-wrap-is-e


Alas, it's not possible. Bug to the Visual Studio developers at http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/3285423-wrap-lines-intelligently-simulating-indents- . Please vote for it!




回答2:


This extension does what I want, but only for Visual Studio 2010 :/

http://visualstudiogallery.msdn.microsoft.com/ac95f80f-6cfd-4b67-b0fd-e9c5c8fb27de

NB. I tried hacking the extension manifest to make it install on 2012 but the behaviour went awry. The extension needs a real update




回答3:


For VS2012, there is an extension http://visualstudiogallery.msdn.microsoft.com/a5b5001e-fe7a-4c08-9cf5-96ae5892088a

It does the same thing...



来源:https://stackoverflow.com/questions/12324453/how-to-make-word-wrap-respect-indentation-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!