[IPython-user] readline configuration + 4

Scott Kirkwood scottakirkwood at gmail.com
Mon Jun 20 15:31:30 CDT 2005


Hi Jerry,
I found most of what you might need at 
http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC13

- ESC for clearing a line is unusual for me.
- For Word Left, Word right it's Alt-b, Alt-f but you could redifine as 
Ctrl-Left, Ctrl-Right I suppose, my guess is that it would be for backward 
word:

readline_parser_and_bind "\C\e[D":  backward-word

readline_parser_and_bind "\C\e[C":  forward-word

But I haven't tested it.
- There's "yank" command and which is really a paste

I'm not sure how you would change what a 'word' is, there probably is a way 
but a quick look through the documentation didn't show up anything obvious.

-Scott

On 6/20/05, Jerry McRae <qrs0xyc02 at sneakemail.com> wrote:
> 
> Hi Scott,
> 
> You <> wrote on Monday (6/20/2005 at 8:42 AM) thus about [IPython-user] 
> readline configuration:
> > Figured out my error: I wrote readline_parser_and_bind instead of
> > readline_parse_and_bind.
> > Tried it and it works beautifully.
> > Now it's much more like bash, perhaps these bindings should be turned on 
> by
> > default?
> 
> Thanks for posting. Being only a casual Linux user I was missing
> these key bindings and I wasn't familiar with readline. This helps a lot.
> I did find with some trial and error the ^Z key which will undo
> changes, that helps a lot also.
> 
> I have a couple other readline related questions that I assume are
> either easily answered or are not implemented. Maybe these have
> nothing to do with IPython, I'm not sure.
> 
> 1. I miss <ESC> to clear the whole line
> 2. control left and right arrows, for word movement
> 3. is there a bash-like yank (^_) and paste (^Y) capability?
> 4. the forward and back word keys (alt-F & alt-B) stop at the
> *delimiters*, and not the *words*. It even stops at *each*
> delimiter. In bash and in Cygwin the backwards word stops on a
> *word* which is MUCH more useful. Even though the forwards word
> keystroke stops on a word *delimiter*, it only stops on the *first*
> delimiter after a word, not on each and every delimiter. How would
> I adjust this to work how I want?
> 
> 
> >> > readline_parser_and_bind "\C-k": kill-line
> >> > readline_parser_and_bind "\C-u": unix-line-discard
> 
> (Python 2.3.5, IPython 0.6.13, Windows XP)
> 
> --
> Jerry
> ___________________________
> A theory is no more like a fact than a photo is like a person.
> -- Ed Howe
> 
> 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/ipython-user/attachments/20050620/f9accb9c/attachment.html 


More information about the IPython-user mailing list