Commits

Anonymous committed 82f8832

ropemacs: moved keybindings to ropemacs module

  • Participants
  • Parent commits c541a82

Comments (0)

Files changed (2)

File docs/dev/workingon.txt

 - Closing the project when exiting emacs; kill-emacs-hook
 - Adding hooks for SOI when saving buffers; after-save-hook
 
-* Renaming modules and packages
+* Only activating the keybinding in python files
+* Moving keybinding to `ropemacs` module
+* Renaming current modules
 * Specifying refactoring options
 * Add to docs

File rope/contrib/ropemacs.py

 
     def init(self):
         """Initialize rope mode"""
-        #lisp.global_set_key(lisp.kbd('C-c r r'), lisp.rope_rename)
         lisp.add_hook(lisp.before_save_hook,
                       lisp.rope_before_save_actions)
         lisp.add_hook(lisp.after_save_hook,
                       lisp.rope_after_save_actions)
         lisp.add_hook(lisp.kill_emacs_hook,
                       lisp.rope_exiting_actions)
+        lisp.global_set_key('\x03g', lisp.rope_goto_definition)
+        lisp.global_set_key('\x03rr', lisp.rope_rename)
+        lisp.global_set_key('\x03rl', lisp.rope_extract_variable)
+        lisp.global_set_key('\x03rm', lisp.rope_extract_method)
+        lisp.global_set_key('\x03ri', lisp.rope_inline)
 
     def before_save_actions(self):
         if self.project is not None:
 exiting_actions = interface.exiting_actions
 
 goto_definition = interface.goto_definition
+