Sublime Forum

Find Previous

#1

I was searching through the sublime text 3 documentation to see if I can search for a specific word. What I would like to be able to do is expand a selection backwards and forwards to the beginning and end of my function definition. I am able to do this using the expand to scope option, but when I scope out the function in the language file, I lose all syntax highlighting within the function, regardless of the position of the dict entry in the array. I can easily solve my problems again if I was able to do a reverse and a forward search from within the plugin, but I can’t seem to find any functions that will allow me to do anything more than expand by class or scope. Any help would be greatly appreciated!

Edit:
I do realize that the view class does have a find method, but it appears that it only searches forwards. Maybe I can accomplish what I want using a find all and choose the region that starts closest to the left side of my cursor?

0 Likes