Code::Blocks

User forums => Using Code::Blocks => Topic started by: somniantis on July 17, 2017, 08:43:26 am

Title: Source Formatter Plugin
Post by: somniantis on July 17, 2017, 08:43:26 am
Does anyone know if there's an easy way to indent all template functions and classes following the template specifier? The formatter plugin doesn't seem to have an option for this. Please and thank you :)
Title: Re: Source Formatter Plugin
Post by: Commaster on July 17, 2017, 09:59:04 am
You can adjust the template in Settings -> Editor -> Source formatter and then select the text, open the context menu and press "Format use AStyle".
Title: Re: Source Formatter Plugin
Post by: somniantis on July 17, 2017, 01:43:58 pm
Don't see any formatting options for templates. Just seeing if anyone has a solution. All I want is this:

Code: [Select]
template <typename T>
    void Foo(){

    }

instead of this:

Code: [Select]
template <typename T>
void Foo(){

}
Title: Re: Source Formatter Plugin
Post by: stahta01 on July 17, 2017, 03:00:28 pm
I do NOT see that option on link below.

http://astyle.sourceforge.net/astyle.html (http://astyle.sourceforge.net/astyle.html)

You can see if I missed it or request it on Astyle site.
After, Astyle adds it; you can then request here the CB updates the Astyle version.

Tim S.
Title: Re: Source Formatter Plugin
Post by: somniantis on July 19, 2017, 02:48:56 am
Okay, thank you.