Anonymous avatar Anonymous committed 4d5e135

removed rope-complete-and-import command

Comments (0)

Files changed (2)

 C-c r ?           rope-lucky-assist
-                  rope-complete-and-import
 ===============   ============================
 Enabling Autoimport
-Ropemacs provides two commands called ``rope-auto-import`` and
-``rope-complete-and-import`` that can be used to find the module a
-name is defined in and add an import for that name.  But they are
-disabled by default.  Before using them you should add::
+Rope can propose and automatically import global names in other
+modules.  But this feature disabled by default.  Before using them you
+should add::
   (setq ropemacs-enable-autoimport 't)
   from shutil import rmtree
-``ropemacs-complete-and-import`` proposes names starting with the
-given word, too.  Note that these commands are not bound to a key by
-default.  You can do that yourself if you use them a lot.
+Also ``rope-code-assist`` and ``rope-lucky-assist`` propose
+auto-imported names by using ``name : module`` style.  Selecting them
+will import the module automatically.


             lisputils.message('Global name %s not found!' % name)
-    def complete_and_import(self):
-        if not self._check_autoimport():
-            return
-        starting = lisp.current_word()
-        proposals = [x[0] + ' : ' + x[1]
-                     for x in self.autoimport.import_assist(starting)]
-        if proposals:
-            if len(proposals) == 1:
-                proposal = proposals[0]
-            else:
-                proposal = lisputils.ask_values('Which to import: ',
-                                                proposals)
-            name, module = proposal.rsplit(' : ', 1)
-            lisp.insert(name[len(starting):])
-            self._insert_import(name, module)
-        else:
-            lisputils.message(
-                'No global name starting with %s found!' % starting)
-    @interactive
     def generate_autoimport_cache(self):
         if not self._check_autoimport():
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.