Selected blocks and indent control



One operation I use all the time in other editors is to
select a block, then bump the indent up or down. Here is
how it all goes in (for instance) TextPad or MS Visual C's
editor. I start with an existing code block:

if (condition1)
{
    stuff;
}

***Editing, I "wrap" the old code with the new code:

if (condition2)      <-- new
{                    <-- new
if (condition1)
{
    stuff;
}
}                    <-- new

***Block select the old code

if (condition2)
{
if (condition1)      <-- block select
{                    <-- block select
    stuff;           <-- block select
}                    <-- block select
}

***And hit tab, the selected block indents, and I get this:

if (condition2)
{
    if (condition1)
    {
         stuff;
    }
}

----------------

Can I do this somehow in MC's built-in editor, barring a macro
to repeat over and over again?

Following the described sequence just adds a TAB to the block,
which is decidedly not what I want, or would ever want, as
near as I can figure.

Thanks for any insight.

--Ben




I find television very uplifting.
The moment someone turns a TV on,
I am inspired to read a good book.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]