web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

A simple way to indent X++ code in Visual Studio - Dynamics 365 For Operations

Hichem.Chekebkeb Profile Picture Hichem.Chekebkeb 3,371

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!

Comments

*This post is locked for comments

  • Ahmed Issa Profile Picture Ahmed Issa 249
    Posted at

    Hi,

    To re-intend all the document ctr+k, Ctr+d

    To re-intend the selected part ctr+k, ctr+f

  • Hichem.Chekebkeb Profile Picture Hichem.Chekebkeb 3,371
    Posted at

    Yes Fernando, Thats it =)

  • Fernando Dax Profile Picture Fernando Dax 5
    Posted at

    Isnt that basically

    Select all

    Copy

    Paste?