Hi there and thanks in advance for any help on this.
I have tried hunting here and other places on the web but have not found anything to help. If this is obvious or has been asked before then I am sorry.
I am using Sublime Text 2 and I often end up with a load of open files because they meet a criteria that I have been working on.
I would like to list all those files out a new text file, within Sublime text.
Something like: for each open file write filename (or possibly full filepath) Next
I know I can get there from the open files panel but that only lists the files, there is no interaction with it that does what I expected. To thought I might be able to highlight files and use copy and paste to get a list.
Is this a built-in function that I have missed? Is there already a package to do this? Will I have to work out how to write a plug-in to do this?
Once again, many thanks for any and all assistance on this.
(If it makes any difference this is Sublime text 2, mostly on Windows but I do also switch across to Mac regularly for different jobs)
import sublime
import sublime_plugin
class RunningfileCommand(sublime_plugin.TextCommand):
def run(self, edit):
self.view.window().new_file().insert(edit, 0, "\n".join([view.file_name() for view in sublime.active_window().views() if view and view.file_name()]))
Add below content on it:
[{ "keys": ["f12"], "command": "runningfile" }]
Thanks
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With