MCPcopy Index your code
hub / github.com/chasingboy/Xtools / run

Method run

xtools.py:256–269  ·  view source on GitHub ↗
(self, edit)

Source from the content-addressed store, hash-verified

254
255class SelectLinesCommand(sublime_plugin.TextCommand):
256 def run(self, edit):
257 buffers = get_buffer_text(self.view)
258 findstr = get_console_text(self.view).strip('\n').split('\n')
259 if len(findstr) == 0:
260 sublime.message_dialog('[error] Please select input text and input finding strings')
261 return
262
263 text = ''
264 for line in buffers.split('\n'):
265 for fs in findstr:
266 if fs in line or fs == line:
267 text += line.strip() + '\n'
268
269 new_view(self.view, edit, text)
270
271
272class AddPrefixSuffixCommand(sublime_plugin.TextCommand):

Callers

nothing calls this directly

Calls 3

get_buffer_textFunction · 0.85
get_console_textFunction · 0.85
new_viewFunction · 0.85

Tested by

no test coverage detected