1

I'm wondering if there is any way to sort an initializer list in VSCode (C++), like an extension (couldn't find anything so far).

This is mainly to silence the reorder warning, when initialization list order doesn't match members'.

So

class C {                                        class C {
  C() : b(3), a(5) {}                              C() : a(5), b(3) {}
  int a;                          =>               int a;
  int b;                                           int b;
}                                                }

Ideally I could toggle it with a keyboard shortcut to apply to the current file.

Big Bro
  • 797
  • 3
  • 12
  • 1
    ReSharper does it in visual studio IDE. Maybe it is available for vs code also – RoQuOTriX Jun 17 '21 at 07:59
  • Thanks but [it looks like it's not available](https://resharper-support.jetbrains.com/hc/en-us/community/posts/206010179-Is-there-any-plans-for-Resharper-to-support-VS-Code-). – Big Bro Jun 17 '21 at 08:45

0 Answers0