Feature #5036 2010-06-17 21:44

rjwgnr27

parentheses/backets on selection

A quick editing feature I have used is when an expression is
highlighted, and a (open) parenthesis is typed, the matching
parentheses is added to the other end.  So if you have:

   a + 10 * 2

and highlight "a + 10" then press "(", you would get:

  (a + 10) * 2

Probably, the selection should remain unchanged, i.e. inside
the parenthesis.

Similar feature would be for languages where brackets are
meaningful (like C, etc), when lines are selected, and a "{" is
typed, the range becomes bracketed and indented according
to the style.  The cursor could move to the outside of either
bracket, so you could add your "if", etc:

    some_code_here();
#>> start of selection
    do_something();
    do_another_thing();
    ++i;
# << end of selection

With the above lines selected, typing "{" becomes:

    some_code_here();
    {
        do_something();
        do_another_thing();
        ++i;
    }

If the cursor is now at the "{", I can start adding my "if" or
"for" or whatever for the block.
Category
Editing
Status
Open
Close date
 
Assigned to