Sublime Forum

How to get the region of a particular scope?

#1

Hi folks,

suppose I use **scope_name **at the current point to find out if I’m inside some interesting scope. If positive, then I’d like to get the region for that particular scope, which isn’t the one that **extract_scope **returns, but an outer one. How to get that region? I can only imagine move the point to out from the current scope and run **extract_scope **again.

Ideally it seems that the API for extract_scope could receive an additional argument:

extract_scope(point, )

TIA!

1 Like

#2

More specifically, I want to find the region of a Latex table.

0 Likes

#3

I ended up just going backward by line until I was out of the scope, and then same thing forward for finding the end. (A hack).

0 Likes