akof1314 / CoolFormat

CoolFormat Source Code Formatter
http://blog.csdn.net/akof1314/article/details/5355948
535 stars 147 forks source link

"Indent switches" is not always working in Sublime Text 3 #11

Open HybridRbt opened 9 years ago

HybridRbt commented 9 years ago

This option is not working when used in "Selected format" command, but works fine in "Quick format" command. I was using Sublime Text version 3066 on Windows 7.

akof1314 commented 9 years ago

I tested was successful. Do you use the parameters (-S) see http://akof1314.github.io/CoolFormat/doc/Cpp.html

eg.

[SynTidy] C++=""-A1-p-N-Y-k3-S""

HybridRbt commented 9 years ago

Yes I did. Otherwise it wouldn't be working in Quick Format command, right? And this is my parameter list: C++=""-A1-s4-C-S-fpH-N-Y-k3-y""

Did I form it correctly?

Thanks, Jianfeng

On Mon, Mar 16, 2015 at 4:59 AM WuHuan notifications@github.com wrote:

I tested was successful. Do you use the parameters (-S) see http://akof1314.github.io/CoolFormat/doc/Cpp.html

eg.

[SynTidy] C++=""-A1-p-N-Y-k3-S""

Reply to this email directly or view it on GitHub https://github.com/akof1314/CoolFormat/issues/11#issuecomment-81554390.

akof1314 commented 9 years ago

Can you show some code that not working when used in "Selected format" command?

HybridRbt commented 9 years ago

I am sorry for not getting back to you in time. I was just applying the command to the example you provided in your document. I have attached several pictures to show you the config of my coolformat settings and the format before/after the command was applied.

Thanks, Jianfeng

On Tue, Mar 17, 2015 at 4:27 AM WuHuan notifications@github.com wrote:

Can you show some code that not working when used in "Selected format" command?

Reply to this email directly or view it on GitHub https://github.com/akof1314/CoolFormat/issues/11#issuecomment-82236705.

akof1314 commented 9 years ago

I can not see the attached picture... Can you show me at email kof1234##sina.com

HybridRbt commented 9 years ago

Sure, I will forward this email to your inbox at sina. Or if you prefer, I can post them on github discuss form. Your call. :)

On Fri, Apr 24, 2015 at 8:52 AM WuHuan notifications@github.com wrote:

I can not see the attached picture... Can you show me at email kof1234##sina.com

Reply to this email directly or view it on GitHub https://github.com/akof1314/CoolFormat/issues/11#issuecomment-95938925.

akof1314 commented 9 years ago

When you use "Selected format" command. you should select function

void abc()
{
    switch(foo)
    {case 1:a += 1;
     break; case 2:
    {
            a += 2;
            break;
    }
    }
}

instead of

    switch(foo)
    {case 1:a += 1;
     break; case 2:
    {
            a += 2;
            break;
    }
    }
HybridRbt commented 9 years ago

Thanks for pointing that out! I have tried as you suggested, but it still failed. I have attached the pictures.

WuHuan notifications@github.com于2015年4月24日周五 上午10:28写道:

When you use "Selected format" command. you should select function

void abc() { switch(foo) {case 1:a += 1; break; case 2: { a += 2; break; } } }

instead of

switch(foo)
{case 1:a += 1;
 break; case 2:
{
        a += 2;
        break;
}
}

― Reply to this email directly or view it on GitHub https://github.com/akof1314/CoolFormat/issues/11#issuecomment-95966725.

akof1314 commented 9 years ago

I tested was successful. I send you email