Code-Formatting: How can I change Brace-Position in Control Blocks

Sysprogs forums Forums VisualGDB Code-Formatting: How can I change Brace-Position in Control Blocks

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27243
    runout
    Participant

    Hi,

    this is what I want:
    if (foo) {

    }

    This is set: Options/Text-Editor/C/C++ (VGDB)/Formatting/Extra New Line for control Blocks = false
    But no effect!

    if (foo)
    {

    }

    this is not what I want…
    What can I do to  change this behavior?

    TT

    #27246
    support
    Keymaster

    Hi,

    Most likely, you are using VisualGDB with clang-format. Please try clicking on the “format document” icon in the top right corner of the text editor (near the “go” button). It will open a detailed editor for the clang-format style file.

    #27295
    runout
    Participant

    Hi,

    no chance to find the mentioned button
    Where is the default clang-style-format located?

    Please a little nudge…

    Attachments:
    You must be logged in to view attached files.
    #27311
    support
    Keymaster

    Thanks for the screenshot. Looks like you are using the legacy formatter, so the clang-format settings are irrelevant.

    We have double-checked the configuration you mentioned. The option you mentioned controls an extra newline between “{” and “}”. In order to control whether “{” gets on a separate line, please use the “New control blocks” option instead.

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