Search code examples
emacselisprope

Bind rope-auto-import to a keyboard shortcut in emacs


The way I know to auto-import using rope is to move my cursor to the name I want to import and do M-x rope-auto-import. I'd like to bind rope-auto-import to a keyboard shortcut to make this faster.


Solution

  • Figured it out:

    1. Add the following line to my .emacs file: (global-set-key (kbd "C-c a") 'rope-auto-import)
    2. M-x load-file RET ~/.emacs RET