Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Smart Indent?

Tags:

Is there a way to auto indent (like ctrl+i in MATLAB) FORTRAN code in Visual Studio.

like image 877
dewalla Avatar asked Feb 15 '12 17:02

dewalla


People also ask

How do I turn on auto indent in Visual Studio?

Auto formatting settings in Visual Studio Show activity on this post. Select the text you want to automatically indent. Click menu Edit → Advanced → *Format Selection, or press Ctrl + K , Ctrl + F . Format Selection applies the smart indenting rules for the language in which you are programming to the selected text.

What is smart indent?

Smart indenting is the option you want, provided you want the cursor to be properly indented whenever you press Enter or the up and down arrows in the code. An example is when you create a new method called Method1() and then hit Enter. You'll notice the cursor automatically indents itself.


1 Answers

If you are using Visual Studio with the C# keyboard settings, the keyboard shortcut is Ctrl+K followed by Ctrl+F.

To get the full list of predefined shortcuts, see http://msdn.microsoft.com/en-us/library/da5kh0wa.aspx (Edit.FormatDocument). The list has all keyboard shortcuts from Visual Studio 6 to Visual Studio 2013.

like image 148
Martin Avatar answered Feb 09 '23 23:02

Martin