Menu

Curly braces indentation

2007-04-25
2012-11-13
  • Nobody/Anonymous

    Hi,

    Notepad++ seems to be a powerful and nice editor, but I encounter a problem.
    The closing brace is not aligned automatically when printing. I.e. I get

    if ( a )
    {
        ...
        }

    instead of

    if ( a )
    {
        ...
    }

    At the same time, if TextFX.Autoclose brace is on, it the automatically added closing brace is aligned properly. Scintilla can do it also. Is it possible to set this auto-aligning somehow?

    TIA.

     
    • Nobody/Anonymous

      Oops, the code formatting is wrong. I meant:

      if ( a )
      {
      ....some_expressions_go_here();
      ....}

      and it should look like that
      if ( a )
      {
      ....some_expressions_go_here();
      }

       
    • Jochen

      Jochen - 2007-04-26

      You are right, I can reproduce this behavior - generally. But if you use the "TextFX Settings" "Autoclose {([Brace" you'll get the closing brace immediately after you open one, and it will be aligned correct.