117 lines
2.9 KiB
Plaintext
117 lines
2.9 KiB
Plaintext
|
*vim-php-search*
|
||
|
|
||
|
|
||
|
Php Search
|
||
|
**********
|
||
|
|
||
|
*:PhpSearch*
|
||
|
|
||
|
|
||
|
Pattern Search
|
||
|
==============
|
||
|
|
||
|
Pattern searching provides a means to widen a search beyond a single
|
||
|
element. A pattern search can be executed using the command
|
||
|
|
||
|
:PhpSearch -p <pattern> [-t <type> -s <scope> -i]
|
||
|
|
||
|
All of the results will be placed into the current window's location
|
||
|
list (:help location-list) so that you can easily navigate the
|
||
|
results.
|
||
|
|
||
|
Vim command completion is supported through out the command with the
|
||
|
exception of the pattern to search for.
|
||
|
|
||
|
>
|
||
|
|
||
|
:PhpSearch <Tab>
|
||
|
:PhpSearch -p MyClass* <Tab>
|
||
|
:PhpSearch -p MyClass* -t <Tab>
|
||
|
:PhpSearch -p MyClass* -t class <Tab>
|
||
|
:PhpSearch -p MyClass* -t class -s <Tab>
|
||
|
:PhpSearch -p MyClass* -t class -s project
|
||
|
|
||
|
<
|
||
|
|
||
|
|
||
|
- -p <pattern>: The pattern to search for.
|
||
|
|
||
|
Ex.
|
||
|
|
||
|
MyClass
|
||
|
|
||
|
myFunction
|
||
|
|
||
|
my*
|
||
|
|
||
|
- -t <type> (Default: all): The type of element to search for where
|
||
|
possible types include
|
||
|
|
||
|
- class
|
||
|
|
||
|
- function
|
||
|
|
||
|
- field
|
||
|
|
||
|
- -s <scope> (Default: all): The scope of the search where possible
|
||
|
values include
|
||
|
|
||
|
- all - Search the whole workspace.
|
||
|
|
||
|
- project - Search the current project, dependent projects, and
|
||
|
libraries.
|
||
|
|
||
|
- -i: Ignore case when searching.
|
||
|
|
||
|
|
||
|
Element Search
|
||
|
==============
|
||
|
|
||
|
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. Performing an element search is
|
||
|
the same as performing a pattern search with the exception that you do
|
||
|
not specify the -p option since the element under the cursor will be
|
||
|
searched for instead.
|
||
|
|
||
|
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:EclimPhpSearchSingleResult|
|
||
|
will be consulted for the action to take. If there are multiple
|
||
|
results, the location list will be opened with the list of results.
|
||
|
|
||
|
*:PhpSearchContext*
|
||
|
|
||
|
As a convenience eclim also provides the command :PhpSearchContext.
|
||
|
This command accepts no arguments and will perform the appropriate
|
||
|
search depending on the context of the element.
|
||
|
|
||
|
- If the cursor is on the file name in a require or include call, it
|
||
|
will search the configured include path for the file.
|
||
|
|
||
|
- Otherwise, it will search for the declaration of the element.
|
||
|
|
||
|
|
||
|
Configuration
|
||
|
=============
|
||
|
|
||
|
Vim Variables
|
||
|
|
||
|
*g:EclimPhpSearchSingleResult*
|
||
|
|
||
|
- g:EclimPhpSearchSingleResult (Default: 'split') - Determines what
|
||
|
action to take when a only a single result is found.
|
||
|
|
||
|
Possible values include:
|
||
|
|
||
|
- 'split' - open the result in a new window via "split".
|
||
|
|
||
|
- 'edit' - open the result in the current window.
|
||
|
|
||
|
- 'lopen' - open the location list to display the result.
|
||
|
|
||
|
Note: Search support depends on the eclipse pdt (http://eclipse.org/pdt)
|
||
|
which should be installed for you when choosing php support in the
|
||
|
eclim installer.
|
||
|
|
||
|
vim:ft=eclimhelp
|