You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Iury O. G. Figueiredo edited this page May 13, 2020
·
2 revisions
A vy plugin to quickly jump to pattern occurrences in project files.
The fstmt plugin uses silver search to quickly look up patterns in project
files. It is mostly useful to find out where functions, classes and variables
are referenced in a programming project.
After installing the_silver_searcher package just install fstmt with:
Then uncomment the code below in your ~/.vy/vyrc, file it is placed in your extra plugins section.
# from vyapp.plugins.fstmt import Fstmt# Uncomment and set the path to silver search in case # it is not available in the environment.# Fstmt.PATH = '/path/to/ag'# autocall(Fstmt)
Usage
The most basic usage of fstmt is when one need to find out where a function/class is used.
When looking up occurrences of strings that contain just '\W' characters it is enough to place
the cursor over the desire string then press in NORMAL mode:
<Key-Z>
Note: When there is some selected text then fstmt will use the selected text as search pattern.
It is useful when one want to look up a pattern that is not formed with valid '\W'/word chars.
It would find all occurrences of the string under the cursor sensitively then
display the matches. You can browse the occurrences by pressing:
<Return>
It will open the file then place the cursor at the occurrence line.
For reloading the ocurrences then you just press:
<Key-z>
In NORMAL mode. It will list again the previous matches. The fstmt plugin
looks up for .git, .hg and .svn files in the opened file path. If it can't
find any of these files then it performs the search in the HOME directory
that can be defined with: