[IPython-user] How to configure indent & unindent keystrokes for pyreadline under Windows XP?
Jörgen Stenarson
jorgen.stenarson@bostream...
Tue Feb 23 12:01:13 CST 2010
TP skrev 2010-02-21 17:30:
> I'm using Windows XP, IPython 0.10, Python 2.6.4, pyreadline from
> pyreadline-1.5-win32-setup.exe.
>
>
> But that's in a section that starts off with the comment "readline is
> not available for MS-Windows", so I guess it doesn't apply.
>
> My question is how do you change pyreadlineconfig.ini to bind Meta+i
> (really Alt+i) to insert 4 spaces, and Meta-u (alt+u) to delete 4
> previous characters?
>
In the trunk version on launchpad I just implemented the possibility to
bind your own functions.
Add this example to your pyreadlineconfig.ini
def indent(self, e):
self.insert_text(" ")
def dedent(self, e):
self.backward_delete_char(e)
self.backward_delete_char(e)
self.backward_delete_char(e)
self.backward_delete_char(e)
bind_key("Control-tab", indent)
bind_key("Control-Shift-tab", dedent)
You can get the trunk version using bzr branch lp:pyreadline
/Jörgen
More information about the IPython-user
mailing list