-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,56 @@ | ||
*range-search.txt* Plugin for searching inside ranges | ||
*add-to-word-search.txt* Plugin to append more words to searches. | ||
|
||
============================================================================== | ||
Author: Shlomi Fish < http://www.shlomifish.org/ > | ||
License: MIT/X11 ( http://www.opensource.org/licenses/mit-license.php ) | ||
|
||
============================================================================== | ||
|
||
:[range]Rs {pattern} *:Rs* | ||
Motivation for this plugin: | ||
--------------------------- | ||
|
||
Searches the range for the pattern. | ||
When searching through code one often needs to add more related | ||
terms to the search. For example, if I found a call to a function inside | ||
a different one, or when a type is typedef'ed to something else (in C). | ||
This module aims to allow you to convenietly add search terms to the search | ||
so you can find all the occurences of all of them. | ||
To use: put this in ~/.vim/plugin/ , which can be typed by installing the | ||
Ruby rake package and typing "rake install". | ||
|
||
:[range]RS {pattern} *:RS* | ||
Then you can type <Leader>** to add a search term to the search (mnemonic - | ||
* is the namespace and '*' searches forward for a keyword) and <Leader>## to | ||
add a search term to the search and search backwards (mnemonic - | ||
## like the vim # command). | ||
|
||
Same as :Rs. | ||
<Leader>** | ||
|
||
Add the pattern matched by "*" to the search and searches forward in the | ||
current search pattern. | ||
|
||
<Leader>## | ||
|
||
Add the pattern matched by "#" to the search and searches backward in | ||
the current search pattern. | ||
|
||
================================================= | ||
|
||
The code for this plugin can be found on GitHub: | ||
|
||
https://github.com/shlomif/add-to-word-search.vim | ||
|
||
Forks, issue reports, and pull requests would be welcome. | ||
|
||
Some of the stuff I'd like to add to this plugin: | ||
|
||
1. Add commands corresponding to other * and #-like commands: | ||
|
||
g* | ||
g# | ||
|
||
2. Add some colon commands to add more keywords to the search. | ||
|
||
Enjoy! | ||
|
||
Regards, | ||
|
||
-- Shlomi Fish |