Home Download Buy Blog Forum Support

ST2: Help with "Find Results" builder or function

ST2: Help with "Find Results" builder or function

Postby Xerosis on Mon Jun 24, 2013 8:23 am

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
Posts: 2
Joined: Wed Jun 19, 2013 12:47 pm

Re: ST2: Help with "Find Results" builder or function

Postby miped on Mon Jul 08, 2013 7:20 pm

The way to start the find in files functionality is with something like following code (taken from SideBarEnhancements):
Code: Select all
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".
SublimeGit: Git integration for Sublime Text 2 and 3
Posts: 16
Joined: Mon Jul 08, 2013 6:30 pm

Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 6 guests