“选项卡”在线的中间。缩进而不是制作制表符。 (对比 2010 年)
我认为标题已经说明了一切。但是,当我点击一行代码中间的制表符按钮时,我希望它缩进整行,而不是制作一个不是很有用的制表符 - 除了缩进之外,我从不在代码中使用制表符,如果必须的话在字符串中使用制表符 我使用 \t
。我知道它每次只为我节省了两个按钮(我猜是美国键盘上的一个),但如果有的话肯定会很高兴。
我在扩展“PowerCommands for Visual Studio 2010”和“生产力工具”中寻找过这个,但没有找到我要找的东西。那么,有人知道是否有我没有找到的功能或扩展吗?否则,我想我必须自己做;-)
我主要使用 C#、F# 和 Asp.Net(html 等),所以让它与这些一起工作会很好,但原因是更广泛的解决方案更好(并且例如,仅 C# 的解决方案也很好)。
I think the headline says it all. But when I'm hitting the tab button in the middle of a line of code I want it to indent the whole line instead of making a tab which is not very useful - I never use tab in the code besides indenting and if I have to use a tab in a string I use \t
. I know it´s only saving me two buttons each time (one on US keyboards, I guess) but it would definitely be nice to have.
I have looked for this in extensions "PowerCommands for Visual Studio 2010" and "Productivity tools" but haven't found what I looked for. So, do anyone know whether there is a feature or extension I haven't found? Otherwise, I guess I have to do it myself ;-)
I work primarily with C#, F# and Asp.Net (html etc.) so it would be nice to have it work with these, but of cause broader solutions is better (and ex a C# only solution would also be nice).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
VS2010 中有一个名为“选项卡上自动缩进”的选项可以做到这一点。它位于“工具”>“选项”>“文本编辑器”>“C/C++”>“格式”下。
显然,这似乎仅适用于 C++,而这不是您想要的。但是,如果您可以不用其他 C# 特定编辑工具,您可以告诉 VS 您的文件是 C/C++ 类型文件(“工具”>“选项”>“文本编辑器”>“文件扩展名”)。
There is an option in VS2010 called "Automatic Indentation On Tab" that does exactly that. It is found under Tools>Options>Text Editor>C/C++>Formatting.
Obviously that seems to be only for C++ and that is not what you want. But if you can live without the other C# specific editing tools, you could tell VS that your files are C/C++ type files (Tools>Options>Text Editor>File Extension).