- Subject: Re: how to indent a region multiple times in python-mode
- From: Dave Kuhlman <dkuhlman@xxxxxxxx>
- Date: Fri, 15 Sep 2006 14:45:32 -0700
On Fri, Sep 15, 2006 at 01:26:12PM +0200, Olesen, Mark wrote:
> Servus Joachim,
>
> For this sort of thing, I use a rectangle string insertion.
> Mark the begin/end of a region and then insert the desired string via the
> mini-buffer.
Yes, but ... python-mode in jed already has indent and out-dent
operations: py_shift_region_left and py_shift_region_right, bound to
^C < and ^C >, which indent and out-dent a region *once*.
Almost any other programmers editor will enable me to mark a
region and then indent or out-dent that region multiple times. The
reason that jed will not let me do this is that jed forgets (pops?)
the mark when I do ^C < or ^C >.
I have not figured out how to tell jed not to do this. Basically,
I'd like to be able to tell jed: please do not forget where the
mark is when I do py_shift_region_left or py_shift_region_right.
Big/real emacs (I use jed's emacs mode) in python-mode remembers
where the mark and region are when I indent and out-dent enabling
me to do it multiple times.
Is there a way to get jed to remember the region/mark?
Here is the relevant (I believe) code from pymode.sl. Perhaps
someone can suggest how to modify it so that the region or mark are
remembered:
define py_shift_region_left()
{
variable n;
check_region (1);
n = what_line ();
pop_mark_1 ();
loop (n - what_line ())
{
py_shift_line_left();
go_down_1 ();
}
pop_spot();
}
This is a *very* small wart. But, jed does everything else so
well, that it would be nice to have this one fixed too.
Dave
[alternative solution snipped]
--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2006 date index]
[2006 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]