[最佳答案] AFAIK, an opened file is represented by one or more views. So try to get all views and save those with file names. I wrote a simple example. Hope it can help you. By the way, you can check all API's via the following link. Sublime Text 2 API Reference import sublime, sublime_plugin class SaveAllExistingFilesCommand(sublime_plugin.ApplicationCommand): def run(self): for w in sublime.windows(): self._save_files_in_window(w) def _save_files_in_window(self, w): for v in w.views(): self._save_exitin