Author Topic: pico style  (Read 2334 times)

RaffoPazzo

  • Community Member
  • Posts: 77
  • 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: 6826
  • Hero Points: 526
Re: pico style
« Reply #1 on: May 11, 2018, 01:48:40 PM »
No plan to support it yet.

RaffoPazzo

  • Community Member
  • Posts: 77
  • 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: 2793
  • Hero Points: 347
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: 77
  • 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 :)