简体   繁体   English

Visual Studio Express的“始终缩进”风格

[英]“Always-indent” style for visual studio express

Is there a way to have Visual Studio (2012 Express) auto-indent like it is possible in XCode or Emacs ? 有没有办法像XCodeEmacs中那样使Visual Studio(2012 Express)自动缩进? Saying auto-indent I mean that the IDE indents to the correct level when pressing TAB no matter what position in the line the cursor is in. 说自动缩进是指无论光标在行中的哪个位置,按下TAB时IDE都会缩进正确的级别。

I know I can press Ctrl+K, Ctrl+F or Ctrl+K,D to indent a document or selection, but this is kind of cumbersome. 我知道我可以按Ctrl+K, Ctrl+FCtrl+K,D来缩进文档或所选内容,但这有点麻烦。 Writing code and just pressing TAB to auto-indent the current line is just much faster. 编写代码,然后按TAB可以自动缩进当前行,这要快得多。 Is there a way to do this in VS? 有没有办法在VS中做到这一点?

Go to Tools -> Options choose then Text Editor -> All Languages -> Tabs There you can specifiy: 转到Tools -> Options然后选择Text Editor -> All Languages -> Tabs在那里您可以指定:

  • Tab size 标签尺寸
  • Indent size 缩进尺寸
  • Insert spaces (instead of a tab) 插入空格(而不是制表符)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM