CnPack Forum


 
Subject: Surround with begin..end
gramer
新警察
Rank: 1



UID 42809
Digest Posts 0
Credits 20
Posts 6
点点分 20
Reading Access 10
Registered 2009-7-12
Location Russia
Status Offline
Post at 2009-7-12 08:27  Profile | Blog | P.M. 
Surround with begin..end

Hello, surround with begin..end (Alt + Shift + B) is great feature to use, but I found that it is not working right for me in case
there are some of operators like for.., if.., etc before the line I'm trying to surround with begin..end

For example, I have code like

if Condition then
  Something;

I need to add additional line

if Condition then
begin
  Something;
  SomethingMore;
end;

But when I select Something and hit Alt + Shift + B, I get

if Condition then
  begin
    Something;
  end;

Is there any way to make this tool to distinguish operators like if.., for.., with.. etc and do not shift begin..end construction to the right for them?

For now I've put -1 relative indent in the options since I use this feature with if.. code, but this way it doesn't work with plain code
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6750
Posts 3551
点点分 6750
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2009-7-29 09:59  Profile | Blog | P.M. 
Yes. Reasonable. if begin..end (or {} in C++), it should be auto align with previous line.

We'll add this enhancement in next nightly build version.
Top
 




All times are GMT++8, the time now is 2024-3-29 19:55

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.006977 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP