[Idle-dev] [ idlefork-Patches-673428 ] An extension to add command-wise navigation to the shell

SourceForge.net noreply@sourceforge.net
Thu, 23 Jan 2003 14:24:56 -0800


Patches item #673428, was opened at 2003-01-24 00:24
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309579&aid=673428&group_id=9579

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Noam Raphael (noamr)
Assigned to: Nobody/Anonymous (nobody)
Summary: An extension to add command-wise navigation to the shell

Initial Comment:
This extension enables navigating in the shell window
according to
Python commands, using the Alt key.
Alt+Home goes to the beginning of the current command.
Alt+End goes to the end of the current command.
Alt+Up goes the the previous command.
Alt+Down goes to the next command.

This is, from my experience, useful for two things:
1. Many times, you want to recall a previous command. I
think it is easier to do so in the context of its
output and other commands, so instead of pressing
alt+p, which brings all commands but leaves them out of
context, you do alt+up to move quickly to the place
where you used the command, and then you click enter.
2. if you want to delete the entire command you typed,
especially if it contains multiple lines, you can now
type alt+shift+home, to move to the beginning of the
command while selecting the area, and press delete. I
don't know of an easy way to do this previously.

I wrote this as an extension, but I think the four
events should go directly to the PyShell class. I think
doing that is quite easy.

I don't see a way to attach two files, and I don't want
to bother you with another update, so you should add
the attached file to the directory of IDLEfork, and add
the following to config-extensions.def:

[CommandNavigator]
enable=1
[CommandNavigator_bindings]
beg_of_command=<Alt-Key-Home>
end_of_command=<Alt-Key-End>
prev_command=<Alt-Key-Up>
next_command=<Alt-Key-Down>


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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309579&aid=673428&group_id=9579