Sublime Forum

Open new file as a "Find Results" buffer

#1

I’ve searched up and down and cant find anything like this.

I’m building a plugin to use ripgrep for search. I’d like to load the results with the same find buffer that sublime’s built in search does, meaning the query is highlighted and double clicking it takes you to that line in the file.

The other plugins that offer search capabilities either open a quick panel or open a flat file with no interactivity. I worry this is because it’s impossible to do what I’m trying to do, but I can’t figure out for sure from the API documentation.

Any ideas? Thanks

0 Likes

#2

You can allow click navigation by setting the result_file_regex, result_line_regex and result_base_dir settings on the view you create.

You can grab the existing find results panel via

window.find_output_panel('find_results')
2 Likes