Author Topic: pico style  (Read 779 times)

RaffoPazzo

  • Community Member
  • Posts: 65
  • Hero Points: 2
pico style
« 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?

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4924
  • Hero Points: 402
Re: pico style
« Reply #1 on: May 11, 2018, 01:48:40 pm »
No plan to support it yet.

RaffoPazzo

  • Community Member
  • Posts: 65
  • Hero Points: 2
Re: pico style
« Reply #2 on: March 19, 2019, 07:52:48 am »
Is there a way I can write it myself via slick-C or something?

Graeme

  • Senior Community Member
  • Posts: 2363
  • Hero Points: 311
Re: pico style
« Reply #3 on: March 19, 2019, 10:52:13 am »
"Artistic style" appears to support it
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.

RaffoPazzo

  • Community Member
  • Posts: 65
  • Hero Points: 2
Re: pico style
« Reply #4 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 :)