CnPack Forum

Subject: Surround with begin..end
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

I need to add additional line

if Condition then

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

if Condition then

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
Passion (LiuXiao)
Rank: 9Rank: 9Rank: 9

UID 359
Digest Posts 19
Credits 6688
Posts 3523
点点分 6688
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.

All times are GMT++8, the time now is 2022-9-27 04:08

携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.009781 second(s), 9 queries , Gzip enabled

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