SlickEdit Community

Archived Beta Discussions => SlickEdit 202x Beta Discussions => SlickEdit 2023 v28 Beta Discussion => Topic started by: astromme on October 03, 2023, 06:56:25 PM

Title: C++ lambda formatting option
Post by: astromme on October 03, 2023, 06:56:25 PM
When I want to enter a lambda, I type this all out by hand:
Code: [Select]
    std::for_each(container.begin(), container.end(), [](){});

Then, I press enter between the braces and get this (the carat is where the cursor is):
Code: [Select]
    std::for_each(container.begin(), container.end(), [](){
        ^
                                                          });

What I want is this:
Code: [Select]
    std::for_each(container.begin(), container.end(), [](){
        ^
    });

Is there any way to autoformat the closing brace on the same column as the std::for_each?
Title: Re: C++ lambda formatting option
Post by: Dennis on October 16, 2023, 08:00:13 PM
I've reproduced this problem and I am looking into it.
Title: Re: C++ lambda formatting option
Post by: Dennis on October 16, 2023, 09:53:24 PM
I have a fix, but it was too late for the upcoming beta 4.
Title: Re: C++ lambda formatting option
Post by: Dennis on October 17, 2023, 05:33:57 PM
Attached is a hot fix for this problem for beta4.