SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: RaffoPazzo on May 11, 2018, 11:56:36 AM

Title: pico style
Post by: RaffoPazzo on May 11, 2018, 11:56:36 AM
Hi, I came across code using pico style, eg:

Code: [Select]
void foo()
{   bar();
    if (check)
    {    bar();
         ... }
    else
    {    ...
         ... } }

void func()
{   ...
    ... }

Is there a way/plan to support it?
Title: Re: pico style
Post by: Clark on May 11, 2018, 01:48:40 PM
No plan to support it yet.
Title: Re: pico style
Post by: RaffoPazzo on March 19, 2019, 07:52:48 AM
Is there a way I can write it myself via slick-C or something?
Title: Re: pico style
Post by: Graeme on March 19, 2019, 10:52:13 AM
"Artistic style" appears to support it
http://astyle.sourceforge.net/astyle.html#_style=pico (http://astyle.sourceforge.net/astyle.html#_style=pico)

You can write a macro to enter braces and bind it to {

Code: [Select]
_command void pico_brace() name_info(','VSARG2_MULTI_CURSOR|VSARG2_REQUIRES_EDITORCTL|VSARG2_CMDLINE)
{
   _insert_text("{   }");
   cursor_left();
   cursor_left();
   cursor_left();
}


For C/C++, the "{" character is bound to c_begin.
Title: Re: pico style
Post by: RaffoPazzo on May 17, 2019, 10:44:07 AM
No plan to support it yet.

Looking at all the formatting settings avaiable, it seems you only need a couple more, eg "Break line after {", "Number of spaces after {", "Keep } on same line", etc. In principle it sounds like something simple to add for you guys :)