简体   繁体   中英

How can I get Emacs' key bindings in Python's IDLE?

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?

IDLE provides Emacs keybindings without having to install other software.

  1. Open up the menu item Options -> Configure IDLE...
  2. Go to Keys tab
  3. 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, ...

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM