Write down a few simple examples explain
import sublime import sublime_plugin class ExampleCommand(sublime_plugin.TextCommand): def run(self, edit): sels = self.view.sel(); for sel in sels: print(sel);
Then select the text to see the following output
From the 8th to the character of the three character Why not (3,8) it because I came from behind Wang Qianmian election
import sublime import sublime_plugin class ExampleCommand(sublime_plugin.TextCommand): def run(self, edit): sels = self.view.sel(); for sel in sels: print(sel.end());
Then the output is the 8