How to get Regions Sublime creates when a word is selected?

When you select a word in Sublime Text 2 , the word is highlighted, and other words in one document are visually indicated / placed in the box. From what I understand, they are all called regions, but I'm new to writing Sublime and Python plugins.

How to get all of these areas in Python? According to the API , I could use get_regions(key) , but I have no idea what the key could be!

I was able to create my own regions using find_all with the currently selected word, but the regions are slightly different from what stands out in Sublime. I would like to somehow access the built-in functions, if possible.

Selected and outlined text

In the image, I selected β€œtext,” and Sublime selected all the other words. Basically, I want to get this RegionSet.

+4
source share

Source: https://habr.com/ru/post/1441949/


All Articles