Hi math2001,
If I do my selections first and then click "edit in new tab’. Otherwise, it opens one tab for each selection. I need a plugin that append the selection into a single tab ( or document). No matter how many times I select from the source document.
I am pretty sure the plugin can be modified so that it dumps the selections into a single tab. Thank you.
import sublime, sublime_plugin
class EditInNewTabCommand(sublime_plugin.TextCommand):
    def run(self, edit):
        selection_text = ""
        # open a new file
        view = sublime.active_window().new_file()
        # get selected text
        sels = self.view.sel()
        for sel in sels:
           selection_text = selection_text + self.view.substr(sel) + '\n'
        # insert selected text into the new file
        view.insert(edit, 0, selection_text[:-1])
So I need “Edit in new Tab” to create a new tab only once ( only for the first time), and if I do Edit in new tab, it stays in the source tab not showing the opened tab. I hope this is possible. I guess the created file should be global ( or static on the disk) for above plugin to work.
Thank you very much,
CS