简体   繁体   中英

How to automatically rearrange code within Jetbrains Rider?

I'm evaluating Jetbrains Rider 2017.1.1 for a C# project. I need to automatically rearrange code based on specific rules (like moving private methods to the bottom, public methods to the top, ...). I used this feature with IntelliJ IDEA.

Within Rider the "Code -> Rearrange Code" option is available but greyed out. Did I miss to activate it somewhere or is it just not available yet? If so, is there an appropriate formatting plugin?

As for Rider 2017.2 EAP3, the UI for code arrangement setting is not implemented. However, Rider respects ReSharper settings. If you have configured File Layout in ReSharper and saved it to a team-shared layer, then running Code Cleanup in Rider will apply your layout.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM