ludwigschwardt/python-readline — Issue #12: VI editing mode - delete/change over motion broken 
Author: mario-grgic
Created: 2011-12-24 02:42:53+00:00
State: open

I'm on Mac OS X 10.6.8 using pre-installed python 2.6.1 and I have installed readline-6.1.0-py2.6-macosx-10.6-universal.egg. My .input.rc looks like this:

set completion-ignore-case On
#TAB: menu-complete
Tab: complete
set editing-mode vi

When I start interactive python most of VI editing functionality works, however delete operator in conjunction with motion does not work. For example if the line is

>> print "Hello There"

and the cursor is on the first letter p and you are in normal mode (ESC) typing f" correctly moves you to the first quote. Hitting l moves correctly one space left. Hitting df" should delete until the next quote i.e. erase text Hello There so the line becomes

>> print ""

But instead you get a beep and the cursor is moved forward just before the last quote and nothing is deleted. This is clearly wrong.

Similarly c (change) operator doesn't work over motion either, even though motion commands alone work properly.

Note that readline library does support delete and change operators over motion.