Is there a way to auto indent (like ctrl+i in MATLAB) FORTRAN code in Visual Studio.
Asked
Active
Viewed 3.6k times
2 Answers
33
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.

Craig M. Brandenburg
- 3,354
- 5
- 25
- 37

Martin
- 39,309
- 62
- 192
- 278
3
Select the code you want to format and press Ctrl+K,F (i.e Ctrl+K then Ctrl+F)
Ctrl+K,D will format the entire document, without changing your cursor position (as Select-All option does).

Filip Ion Dorinel
- 339
- 1
- 9

ilivewithian
- 19,476
- 19
- 103
- 165
-
I believe you format the entire document by pressing `Ctrl` + `K` `Ctrl` + `D` – Thorkil Værge Apr 30 '18 at 09:41