Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 247
Ray Avatar asked Sep 10 '08 21:09

Ray


People also ask

How do I run Python code in IDLE?

To execute a file in IDLE, simply press the F5 key on your keyboard. You can also select Run → Run Module from the menu bar. Either option will restart the Python interpreter and then run the code that you've written with a fresh interpreter.

What are IDLE usability features in Python?

IDLE has the following features: coded in 100% pure Python, using the tkinter GUI toolkit. cross-platform: works mostly the same on Windows, Unix, and macOS. Python shell window (interactive interpreter) with colorizing of code input, output, and error messages.


1 Answers

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, ...

like image 54
Cristian Avatar answered Oct 23 '22 12:10

Cristian