How to prevent VGDB from reformatting arrays?

Sysprogs forums Forums VisualGDB How to prevent VGDB from reformatting arrays?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #25041
    jona
    Spectator

    When pasting, making regions or formatting other code, the formatter will turn this:

    static GUI_CONST_STORAGE unsigned char _acForward[] = {
    ________, ________, ________, ______X_,
    ________, ________, ________, ________,
    ______XX, ________, ________, ________,
    ________, ______XX, X_______, ________,

    into

    ________,
    ________,
    ________,

    or

    0x00, 0x00,0x00,0x00, 0x00,0x00,0x00, 0x00,

    into

    0x00,

    0x00,

    0x00,

    0x00,

     

    Can I disable that somewhere?

     

     

     

    • This topic was modified 4 years, 10 months ago by jona.
    #25045
    support
    Keymaster

    Hi,

    Please check whether the code formatting for your project is managed by clang-format, or the legacy formatting engine. If a formatting icon appears in the top right corner of the text editor, the file is managed by clang-format and the formatting behavior can be configured by clicking at this icon. For legacy formatting engine, you can use Tools->Options->Text Editor->C/C++ (VisualGDB)->Formatting.

    If you are not sure, please send us a screenshot of your Visual Studio window having the source file open and we will provide you with more detailed steps.

    #25047
    jona
    Spectator

    Not knowing what the ‘formatting icon’ looks like I checked the Text Editor | C/C++ (Visual GDB) formatting setting and it is set to SysProgsFormat

    #25048
    jona
    Spectator

    I have changed it to clang and I can see the clang formatting icon and options. I don’t immediately see a way to resolve this minor issue. I am using these arrays to design 1 bit/pixel bitmap arrays in code and it is much easier when I do not have to re-align them if I have pasted, or attempted to format a selection.

    I am not assuming there is a way around this..

     

    Thanks for your reply !

    #25049
    support
    Keymaster

    Hi,

    If you are using clang-format, please use our graphical format file editor to change the line break logic. If you cannot find a specific setting, please refer to the clang-format documentation here for an exhaustive list of formatting settings.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.