CnPack Forum » CnWizards IDE Wizards » Surround with begin..end


2009-7-12 08:27 gramer
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
[code]if Condition then
  Something;[/code]

I need to add additional line
[code]if Condition then
begin
  Something;
  SomethingMore;
end;[/code]

But when I select Something and hit Alt + Shift + B, I get
[code]if Condition then
  begin
    Something;
  end;[/code]

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

2009-7-29 09:59 Passion
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.:handshake

页: [1]
查看完整版本: Surround with begin..end


Powered by Discuz! Archiver 5.0.0  © 2001-2006 Comsenz Inc.