You can write whatever specific functionality you want via a plug-in. I was just tinkering around with this so here are the commands fresh from my memory.
To get you started:
[code]import sublime, sublime_plugin
class ExampleCommand(sublime_plugin.TextCommand):
def run(self, edit):
[/code]
This will get you the current selection:
SearchTerm = self.view.substr(self.view.sel()[0])
This will let you find all matches for that text:
RegionsResult = self.view.find_all(SearchTerm, sublime.IGNORECASE)
This will clear the old selection:
self.view.sel().clear()
This will select the second occurance of SearchTerm in the document
self.view.sel().add(sublime.Region(RegionsResult[1].a, RegionsResult[1].b))
If you want your own input panel, you can use:
[code]self.view.window().show_input_panel(âPlease enter custom incremental search text:â, ââ, self.on_done, None, None)
def on_done(self, text):
RegionsResultFromInputPanel = self.view.find_all(text, sublime.IGNORECASE)
[/code]
These commands (taken from the menu) may also help you:
[quote] { âcommandâ: âfind_underâ, âcaptionâ: âQuick Findâ },
{ âcommandâ: âfind_all_underâ, âcaptionâ: âQuick Find Allâ },
{ âcommandâ: âfind_under_expandâ, âcaptionâ: âQuick Add Nextâ },
{ âcommandâ: âslurp_find_stringâ, âcaptionâ: âUse Selection for Findâ },
[/quote]