Sublime Forum

ST2: Help with "Find Results" builder or function

#1

I want to display search results and add the same functionality (i.e. double clicking jumpTo file), returned by a third-party process, in the same way ‘Find in files’ does.
Currently I create a new file and view named “Find Results” with Results.hidden-tmLanguage formatting and then append text to the Find Results.

BUT is it maybe possible to access the function used within Sublime to build “Find Results”?

Any advice or help would be much appreciated

0 Likes

#2

The way to start the find in files functionality is with something like following code (taken from SideBarEnhancements):

self.window.run_command("show_panel", {"panel": "find_in_files", "where":",".join(items) })

However nowhere in the default packages is the string find_in_files or any variation of it defined, except for the syntax highlighting. That, and the fact that it’s wicked fast and has a “custom” ui, makes me pretty sure that the functionality is not implemented in python.

So while it’s possible to invoke the find in files functionality in a pretty flexible way, I don’t think you can hook into the functionality from a plugin unfortunately. It seems to be “all or nothing”.

0 Likes