A simple way to indent X++ code in Visual Studio - Dynamics 365 For Operations
Coming from C# and Visual Studio with Resharper to X++ & MorphX with Resharper the most painful thing I struggled with is the code indentation. The code gets messy quickly, and no out-of-box feature to indent it automatically.
Even with moving X++ editing to Visual Studio the issue remains. I hope Microsoft will make X++ coding experience the same as C# one day or move D365FO coding to C# (I prefer the latter).
Sorry, I could make the post in one line but I had to make a long intro so the post would look interesting =D, let's move to our trick:
I found a simple way to indent X++ in Visual Studio by doing: Ctrl+A, Ctrl+C, Ctrl+V
The trick works in most cases. It may not work if the code is incomplete, has errors or some other extra major forces which I still ignore.
That's it!
Hope it helps!

Like
Report
*This post is locked for comments