On 4/16/2010 5:27 AM, Andreas Roehler wrote:
Hi Barry,
trying to keep some experimental implementations synced
semantically, I'm stumbling about the following:
py-goto-block-up (&optional nomark)
"Move up to start of current block.
Go to the statement that starts the smallest enclosing block; roughly
speaking, this will be the closest preceding statement that ends with a
colon and is indented less than the statement you started on....
"
IMHO it should rather be named into something like
`py-goto-beginning-of-block'
while `py-goto-block-up' indicates a higher level.
excellent. do need to work on the naming a bit. As this is two dimensional
navigation. Previous and next four blocks earlier and later the file and in
versus out for nesting depth.
block-out
block-in
block-previous
block-next
block-previous-out
block-previous-in
block-next-out
block-next-in
the first two (block-in/out) would navigate strictly on indentation. the second
two, navigate strictly on blocks independent of indentation. For example, if
you have three blocks at the same level, it will go to the previous block and
not the fourth block which is outdented. The third pair previous-out/in
navigates to the previous block that is either outdented or indented
respectively. The third pair next out/in navigates to the next block that is
either outdented or indented respectively.
one additional level of usefulness would be to not just do a go to but also do a
push to so you can return to where you had left off.
Personally, I moving the mouse or pen to point to the right word, expression or
whatever and say something like
"<goto | push to| select | replace> [count] <character | word | line | matched |
expression>"
Might be a bit rough to deal with if you are not talking to your computer (even
if you are saying *%*^%^$%) but it's a good starting point for navigational
functionality for programming.
_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode