Anonymous avatar Anonymous committed abd8020

prefixing rope-find-file should show python files only

Comments (0)

Files changed (2)

 see all files in the project; files are shown as their reversed paths.
 For instance ``projectroot/docs/todo.txt`` is shown like
 ``todo.txt<docs``.  This way you can find files faster in your
-project.
+project.  ``rope-find-file-other-window`` (``C-x p 4 f``) opens the
+file in the other window.  With prefix, these commands show python
+files only.
 
 
 Code-Assist

ropemacs/interface.py

         if self.autoimport is not None:
             starting = source[starting_offset:offset]
             names.extend(x[0] + ' : ' + x[1]
-                         for x in self.autoimport.import_assist(starting))   
+                         for x in self.autoimport.import_assist(starting))
         return starting_offset, names
 
     def _check_autoimport(self):
             prefix = prefix[:common]
         return prefix
 
-    @interactive
-    def find_file(self):
-        file = self._base_find_file()
+    @rawprefixed
+    def find_file(self, prefix):
+        file = self._base_find_file(prefix)
         if file is not None:
             lisp.find_file(file.real_path)
 
-    @interactive
-    def find_file_other_window(self):
-        file = self._base_find_file()
+    @rawprefixed
+    def find_file_other_window(self, prefix):
+        file = self._base_find_file(prefix)
         if file is not None:
             lisp.find_file_other_window(file.real_path)
 
-    def _base_find_file(self):
+    def _base_find_file(self, prefix):
         self._check_project()
-        files = self.project.get_files()
+        if prefix:
+            files = self.project.pycore.get_python_files()
+        else:
+            files = self.project.get_files()
         names = []
         for file in files:
             names.append('<'.join(reversed(file.path.split('/'))))
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.