How can I get Emacs' key bindings in Python's IDLE?
Question
I use Emacs primarily for coding Python but sometimes I use IDLE. Is there a way to change the key bindings easily in IDLE to match Emacs?
Solution
IDLE provides Emacs keybindings without having to install other software.
- Open up the menu item Options -> Configure IDLE...
- Go to Keys tab
- In the drop down menu on the right side of the dialog change the select to "IDLE Classic Unix"
It's not the true emacs key bindings but you get the basics like movement, saving/opening, ...
OTHER TIPS
There's a program for Windows called XKeymacs that allows you to specify emacs keybindings for different programs. It should work with IDLE.
http://www.cam.hi-ho.ne.jp/oishi/indexen.html
-Mark
'readline' module supposedly provides Emacs like key bindings and even functionality. However, it is not available on Windows but on Unix. Therefore, this might be a viable solution if you are not using Windows.
import readline
Since I am running IDLE on Windows it is unfortunately not an option for me.