I am writing a plugin for Sublime Text 2/3 for which many files should open which would have a fixed string in the names Are there.
How do I get a list of files in the project? I can not find a related API function in the document. I can do it with Python's OS Walk
but it's a bit slow on the other hand, the sub-column's Ctrl + P
is faster than the menu, but I do not know if I How to access its content from the plugin.
Sublime Text 3 function exists for the file received in the project, but the function project_data ()
exists that gives information related to the project files you can code code like this:
project_data = sublime.active_window (). Project_data () project_folder = project_data ['folders'] [0] ['path'] # and running OS here (project_folder)
Comments
Post a Comment