Is there a way to auto indent (like ctrl+i in MATLAB) FORTRAN code 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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With