Anonymous committed f45c414

added local prefixed keys for codeassist actions

Comments (0)

Files changed (1)


             ('n d', lisp.rope_create_directory)]
         self.local_keys = [
+            ('/', lisp.rope_code_assist),
+            ('?', lisp.rope_lucky_assist),
+            ('g', lisp.rope_goto_definition),
+            ('d', lisp.rope_show_doc),
+            ('f', lisp.rope_find_occurrences)]
+        self.shortcuts = [
             ('M-/', lisp.rope_code_assist),
             ('M-?', lisp.rope_lucky_assist),
             ('C-c g', lisp.rope_goto_definition),
-            ('C-c C-d', lisp.rope_show_doc),
+            ('C-c d', lisp.rope_show_doc),
             ('C-c f', lisp.rope_find_occurrences)]
         self.hooks = (
             (lisp.before_save_hook, lisp.rope_before_save_actions),
     def _prepare_refactorings(self):
-        prefix = lisp.ropemacs_local_prefix.value()
         for name in dir(refactor):
             if not name.startswith('_') and name != 'Refactoring':
                 attr = getattr(refactor, name)
                     name = self._refactoring_name(attr)
                     setattr(self, name, do_refactor)
                     name = 'rope-' + name.replace('_', '-')
-                    if prefix is not None:
-                        key = prefix + ' ' + attr.key
-                        self.local_keys.append((key, lisp[name]))
+                    self.local_keys.append((attr.key, lisp[name]))
     def _refactoring_name(self, refactoring):
         return refactor.refactoring_name(refactoring)
     def register_local_keys(self):
+        prefix = lisp.ropemacs_local_prefix.value()
         for key, callback in self.local_keys:
+            if prefix is not None:
+                key = prefix + ' ' + key
+                lisp.local_set_key(self._key_sequence(key), callback)
+        for key, callback in self.shortcuts:
             lisp.local_set_key(self._key_sequence(key), callback)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.