py-next-statement, py-previous-statement

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

py-next-statement, py-previous-statement

Andreas Röhler-2

Hi,

what about putting cursor with

`py-next-statement' and `py-previous-statement'

at first char on line instead of bol?

Committed it, so you may try...


Cheers

Andreas Röhler
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: py-next-statement, py-previous-statement

Skip Montanaro-3

    Andreas> what about putting cursor with

    Andreas> `py-next-statement' and `py-previous-statement'

    Andreas> at first char on line instead of bol?

    Andreas> Committed it, so you may try...

I've personally never used either command before.  I suppose the changed
behavior would be fine.  If, however, I am on a line with an elif it might
be useful to have it back up to the preceeding elif or if clause instead of
moving up one simple statement or clause at a time.  (Just a thought.)

Skip
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: py-next-statement, py-previous-statement

Andreas Röhler-2
[hidden email] wrote:

>     Andreas> what about putting cursor with
>
>     Andreas> `py-next-statement' and `py-previous-statement'
>
>     Andreas> at first char on line instead of bol?
>
>     Andreas> Committed it, so you may try...
>
> I've personally never used either command before.  I suppose the changed
> behavior would be fine.  If, however, I am on a line with an elif it might
> be useful to have it back up to the preceeding elif or if clause instead of
> moving up one simple statement or clause at a time.

That's not implemented AFAIS yet, but I'll go onto it.

How to name it?

py-previous-condition, resp. py-next-condition?

Would implement it that way, it only looks inside of current
 loop, going to beg or end of loop if no further result.


 (Just a thought.)
>
> Skip
>

Thanks a lot. That's just that kind of thoughts which are helpful.


Andreas Röhler
_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode
Reply | Threaded
Open this post in threaded view
|

Re: py-next-statement, py-previous-statement

Andreas Röhler-2
In reply to this post by Skip Montanaro-3
[...]
.  If, however, I am on a line with an elif it might
> be useful to have it back up to the preceeding elif


Hi Skip,

uploaded new functions

forward-/backward-block

It stops at every line beginning with python-keywords.

Andreas Röhler

--------
Mentioned python-mode.el branch is available at

http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/files



 or if clause instead of
> moving up one simple statement or clause at a time.  (Just a thought.)
>
> Skip
>

_______________________________________________
Python-mode mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/python-mode