Hello,
I am writing a command for Sublime 3, and I would need to search backward from the current position, something like this
def run(self, edit):
pos = self.view.sel()[0].begin()
region = self.view.find(r"---..---", pos)
self.view.sel().clear()
self.view.sel().add(region)
but self.view.find() only searches forward. How can I search backward?
If there is no appropriate method, then can I use the self.view.run_command() method to call the find command (the same way as Ctrl+f does) and force that command to search backward?
Thanks