Element searching allows you to place the cursor over just about any element in a source file (method call, class name, constant) and perform a search for that element by issuing the command :PythonSearch. By default this command will search for declarations, but you can specify that you want to search for references using:
:PythonSearch -x references
If only one result is found and that result is in the current source file, the
cursor will be moved to the element found. Otherwise, on single result matches,
the value of g:EclimPythonSearchSingleResult will be consulted for the
action to take. If there are multiple results, the quickfix list will be opened
with the list of results. You can also force the action to use for the current
search by suppling the -a <action>
arg:
:PythonSearch -x references -a edit
Note
:PythonSearch does not currently support searching for patterns. Attempting to supply a pattern to search for will result in an error.
As a convenience eclim also provides the command :PythonSearchContext.
This command accepts only the optional -a
argument described above, and will
perform the appropriate search depending on the context of the element under the
cursor.
g:EclimPythonSearchSingleResult (Default: ‘split’) - Determines what action to take when a only a single result is found.
Possible values include:
This setting overrides the global default for all supported language types which can be set using the g:EclimDefaultFileOpenAction setting which accepts the same possible values.