Anonymous avatar Anonymous committed 519f907

Not mentioning prefix keys in refactoring classes

Comments (0)

Files changed (2)

ropemacs/__init__.py

                     name = self._refactoring_name(attr)
                     setattr(self, name, do_refactor)
                     name = 'rope-' + name.replace('_', '-')
-                    if attr.key.startswith('C-x'):
-                        self.global_keys.append((attr.key, lisp[name]))
-                    else:
-                        self.local_keys.append((attr.key, lisp[name]))
+                    self.local_keys.append(('C-c r ' + attr.key, lisp[name]))
 
     def _refactoring_name(self, refactoring):
         return refactor.refactoring_name(refactoring)

ropemacs/refactor.py

 
 
 class Rename(Refactoring):
-    key = 'C-c r r'
+    key = 'r'
     optionals = {
         'docs': dialog.Data('Rename occurrences in comments and docs: ',
                             values=['yes', 'no'], default='yes'),
 
 
 class RenameCurrentModule(Rename):
-    key = 'C-c r 1 r'
+    key = '1 r'
     offset = None
 
 
 class Restructure(Refactoring):
-    key = 'C-c r x'
+    key = 'x'
     confs = {'pattern': dialog.Data('Restructuring pattern: '),
              'goal': dialog.Data('Restructuring goal: ')}
     optionals = {'checks': dialog.Data('Checks: '),
 
 
 class Move(Refactoring):
-    key = 'C-c r v'
+    key = 'v'
 
     def _create_refactoring(self):
         self.mover = rope.refactor.move.create_move(self.project,
 
 
 class MoveCurrentModule(Move):
-    key = 'C-c r 1 v'
+    key = '1 v'
     offset = None
 
 
 class ModuleToPackage(Refactoring):
-    key = 'C-c r 1 p'
+    key = '1 p'
     saveall = False
 
     def _create_refactoring(self):
 
 
 class Inline(Refactoring):
-    key = 'C-c r i'
+    key = 'i'
     optionals = {'remove': dialog.Data('Remove the definition: ',
                                        values=['yes', 'no'], default='yes'),
                  'only_current':
 
 
 class ExtractVariable(_Extract):
-    key = 'C-c r l'
+    key = 'l'
     kind = 'variable'
     constructor = rope.refactor.extract.ExtractVariable
 
 
 class ExtractMethod(_Extract):
-    key = 'C-c r m'
+    key = 'm'
     kind = 'method'
     constructor = rope.refactor.extract.ExtractMethod
 
 
 class OrganizeImports(Refactoring):
-    key = 'C-c r o'
+    key = 'o'
     saveall = False
 
     def _create_refactoring(self):
 
 
 class GenerateVariable(_GenerateElement):
-    key = 'C-c r n v'
+    key = 'n v'
 
 
 class GenerateFunction(_GenerateElement):
-    key = 'C-c r n f'
+    key = 'n f'
 
 
 class GenerateClass(_GenerateElement):
-    key = 'C-c r n c'
+    key = 'n c'
 
 
 class GenerateModule(_GenerateElement):
-    key = 'C-c r n m'
+    key = 'n m'
 
 
 class GeneratePackage(_GenerateElement):
-    key = 'C-c r n p'
+    key = 'n p'
 
 
 def refactoring_name(refactoring):
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 ProjectModifiedEvent.java.
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.